Max Kellermann
0c1ecc96a8
*: let libfmt quote strings
2024-04-16 11:50:18 +02:00
Max Kellermann
393d57b387
util/NumberParser: rename to CNumberParser
...
A new NumberParser library based on std::from_chars() will be added.
2024-01-04 21:02:45 +01:00
Max Kellermann
571b6f0cdb
queue/IdTable: add constexpr
(because we can)
2023-11-26 08:43:50 +01:00
Max Kellermann
e7b9e8de14
queue/IdTable: add API docs
2023-11-26 08:43:20 +01:00
Max Kellermann
321553d5f9
queue/IdTable: add explicit
2023-11-26 08:41:57 +01:00
Max Kellermann
4d23068c5c
queue/IdTable: use C++11 initializer
2023-11-26 08:41:19 +01:00
jcorporation
7bf43a9712
Add "added" timestamp to song database
...
- added is set to current time, if a new song is added to the database.
- GetAdded falls back to mtime.
Code for proxy plugin is missing, this needs a patch for libmpdclient.
closes #378
2023-10-20 17:29:31 +02:00
jcorporation
9a28176d72
Save consume and single oneshot as string
...
Consume and single oneshot should be saved as string.
closes #1853
2023-08-07 23:23:08 +02:00
Max Kellermann
42f6a0441c
use [[gnu::...]] attributes
2023-03-06 16:14:15 +01:00
Max Kellermann
7a46c57ef3
tag/Type: require C++
2023-03-06 15:28:44 +01:00
Max Kellermann
148aca23be
use SPDX IDs, replacing the long copyright headers
2023-03-06 14:59:48 +01:00
jcorporation
eb3baf7e99
Cast enum to unsigned
2022-09-20 20:27:25 +02:00
jcorporation
48a936ef5b
Add ConsumeMode oneshot, closes #925
2022-09-20 20:26:49 +02:00
Max Kellermann
cc0def15c4
Copyright year 2022
2022-07-14 17:59:35 +02:00
Max Kellermann
cddeb2a0df
io/BufferedOutputStream: add missing #include
2022-07-13 14:11:36 +02:00
Max Kellermann
b52b0ac85a
*: use BufferedOutputStream::Fmt()
2022-07-13 13:10:14 +02:00
Max Kellermann
ab5b6f83fd
queue/Print: support sorting by priority
2022-02-14 14:10:33 +01:00
Max Kellermann
2172aaf1ce
song/PrioritySongFilter: new filter
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1412
2022-02-14 14:06:37 +01:00
Max Kellermann
c68dbc4e5c
queue/Queue: add method GetLight()
2022-02-14 13:33:34 +01:00
Max Kellermann
c3be961ccf
queue/Print: implement sorting
2022-02-14 13:07:13 +01:00
Max Kellermann
e9e3d8c57c
queue/Selection: add "window" field
2022-02-14 09:12:18 +01:00
Max Kellermann
5588291a35
queue/Selection: wrap SongFilter in a new struct
2022-02-14 09:12:18 +01:00
Max Kellermann
4b41e766c6
queue/Queue{Save,Print}: remove redundant "Queue" prefix from file name
2022-02-14 09:12:06 +01:00
Max Kellermann
a5fa43b526
fs/io: move to io/
2021-12-03 14:35:41 +01:00
Max Kellermann
8681a3d74c
replace TextFile references with LineReader
2021-12-03 14:22:56 +01:00
Max Kellermann
d94e8bd82d
queue/IdTable: include cleanup
2021-11-19 16:03:09 +01:00
Max Kellermann
b0c92e1a34
queue/IdTable: lazy-initialize the "data" array
...
With large "max_playlist_length" settings, the "data" array can be
very large, and initializing it during MPD startup causes page faults,
resulting in allocation of physical RAM. This commit postpones the
initialization until the queue is really large, to avoid wasting
memory.
2021-11-19 16:00:39 +01:00
Max Kellermann
ead5bcf048
queue/IdTable: make size const
2021-11-19 15:51:10 +01:00
Max Kellermann
c0bcfe244c
command/QueueCommands: reimplement relative "move"/"moveid" offsets
...
The existing implementation has been utterly broken forever; I cannot
explain what it actually does, but it doesn't do what the
documentation says.
2021-10-07 22:49:38 +02:00
Max Kellermann
b29a43b4d7
decoder/mad, ...: more libfmt logging
2021-06-25 20:52:08 +02:00
Max Kellermann
36410daaa4
queue/PlaylistEdit: fix inverted check
...
Regression by commit 471c37be59
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1135
2021-05-28 13:56:01 +02:00
Max Kellermann
0440c41cba
client/Response: add method Fmt() based on libfmt
2021-05-25 16:01:56 +02:00
Max Kellermann
b2cec7a0a3
Merge branch 'v0.22.x'
2021-05-19 08:09:05 +02:00
Max Kellermann
c3f9b38c97
command/PlaylistCommands: pass real_uri to LookupRemoteTag()
...
For querying tags, the real song URI should be used, because if the
(display) URI is different, requesting it will not produce a usable
response. This is a theoretical problem because none of the existing
playlist plugins sets the real_uri.
This requires changing the URI comparison in playlist::TagModified().
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1154
2021-05-18 21:35:09 +02:00
Max Kellermann
471c37be59
queue/PlaylistEdit: convert start/end parameters to RangeArg
2021-02-15 22:51:09 +01:00
Max Kellermann
ab160aa359
queue/PlaylistEdit: check "current>=0" before updating it
2021-02-15 22:50:37 +01:00
Max Kellermann
5348f8c9c8
copyright year 2021
2021-01-01 19:54:28 +01:00
Johann Uhrmann
38498d3ee2
Removed duplicate check for negative song time
2020-08-23 12:17:10 +02:00
Max Kellermann
3d7147390f
Merge branch 'v0.21.x'
2020-07-01 16:56:17 +02:00
Max Kellermann
5716cde1fb
queue/PlaylistEdit: fix crash in SetSongIdRange() while playing
...
An assertion failure in UpdateQueuedSong() could trigger because the
`prev` parameter is always `nullptr`, but `queued` may be set. And in
fact, calling UpdateQueuedSong() is only necessary when the queued
song was edited, to re-queue it with the new range.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/901
2020-06-11 07:07:02 +02:00
Rosen Penev
e41a52d909
change abs() to std::abs()
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-25 19:27:42 +01:00
Rosen Penev
6d91b5c7b2
fix double promotions
...
Found with -Wdouble-promotion
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 12:43:24 -07:00
Max Kellermann
cefc773992
playlist/PlaylistSong: pass std::string_view
2020-03-13 19:58:36 +01:00
Rosen Penev
a2f5a63bbc
replace stdint.h with cstdint
...
The former is deprecated by C++14. The standard says they are the same:
The header defines all types and macros the same as the C standard library
header<stdint.h>.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 19:04:39 -07:00
Rosen Penev
ab9f5d2067
replace assert.h with cassert
...
The former was deprecated with C++14.
According to the C++11 and C++17 standards, both files are identical.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 15:25:38 -07:00
Max Kellermann
2817bf9e95
copyright year 2020
2020-01-18 19:23:49 +01:00
Max Kellermann
e1867a99e9
release v0.21.16
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl2m6cwQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEuMlD/9W6UTA9WfbeB2k8F2gFvy30w3jarsIdANG
iRl2qW8a/MSp6zNj5t3rIH/JTOPEVXgB7c844gIC2VHkKAu4M3kV2sqa7cDEcq6o
tFH5npemuCFbpkkAqXHpgFindWGMOqZy01PCN8m70y9IbfmI0Q25jngKeeuzgZ9O
4DHw9IniWNamAi9H3MdGt6BpyuQ+EJ+FOfuJdsJkLgfK15qMn/3LwNoUyCxjyK/K
brdQO0qpBg7dLZoGb6ER7qkyV1Cp+z/Mqeeocn4iQf3RuepIKzhZFMB1MY9FS7O1
YAA89Lpk9mvLqx1/LkArrPEOv7k5Ia5KSmxZJ5dsrdXm/TKVM1k0MxZuE7LoXLXp
wbdhXFoyhuL6lwLkw20wj1zqcTGMAYIp6t48YbDlVy59f/9OVROr++pCQsY+3L2t
JPY90z6hf6yDF5yZCucSt7gin/WXRdeQLTgAxd8EqGqFgIRrW0GZhssg+7O1iGCq
aSAVlxfzhVFxz7eyo4u3Dq/+d6gh3NRzV6exUYMxp3WHu7eweemlnKyxPxQ1lvSF
5EkZXC56wQp0JIcIRYLEXkJN8lmIy/i0xHaOLDB7cJN23CC5Z68Up6peCzvVPp+E
PIzOtT+4/FnQ6euu6KLHeiDyTWxdmGSrSP1W6cc/FpyLU86ZV/5tLg0bEaNxb9Sl
lYfRth0D/A==
=9Cv+
-----END PGP SIGNATURE-----
Merge tag 'v0.21.16'
release v0.21.16
2019-10-16 12:03:12 +02:00
Max Kellermann
12a86c4975
queue/PlaylistEdit: fix relative destination offset when moving a range
...
Commit 13208bf5a7
added range support to
the `move` command, but applied the wrong offset to the `to` variable.
When the source range is before the current song, and the song thus
gets decremented by the range size, then the final destination offset
must also be decremented by the range size.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/663
2019-10-15 17:00:16 +02:00
Max Kellermann
07f212c98c
SongSave: return DetachedSong, not a std::unique_ptr<>
...
Eliminate unnecessary dynamic allocations.
2019-09-05 20:58:04 +02:00
Max Kellermann
b03e4ae692
queue/Save: move code to LoadQueueSong()
2019-09-05 20:56:47 +02:00