Max Kellermann
95842e7984
db/upnp: eliminate the std::forward_list, use IterableSplitString()
2024-01-04 16:31:28 +01:00
Max Kellermann
cc41e95806
db/upnp: add rootid_sv
2024-01-04 16:20:44 +01:00
Max Kellermann
2c77e088b4
db/upnp: eliminate temporary std::string from Visit()
2024-01-04 16:19:03 +01:00
Max Kellermann
c8e2ab6781
db/upnp/Object: smaller enums
2024-01-04 14:31:41 +01:00
Max Kellermann
b2ed29b8c0
lib/upnp/ContentDirectoryService: getFriendlyName() returns std::string reference
...
This can avoid the overhead of casting a C string back to std::string_view.
2024-01-04 14:28:12 +01:00
Max Kellermann
1789b56a85
db/upnp: pass std::string_view to songPath()
2024-01-04 14:28:12 +01:00
Max Kellermann
ee4b49d12f
lib/expat/ExpatParser: pass std::string_view to Parse()
2024-01-04 14:28:12 +01:00
Rosen Penev
f6dbf38e99
upnp: change interface variable name
...
rpc.h under Windows defines interface as struct, which blows up the
build here. Rename to avoid.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-12-28 19:39:05 -08:00
Max Kellermann
d9fb152b95
lib/upnp/ContentDirectoryService: include some headers only with libpupnp
2023-12-28 21:18:41 +01:00
Max Kellermann
9396ffb509
db/plugins/upnp/ContentDirectoryService: add missing closing curly brace
2023-12-28 20:52:53 +01:00
Max Kellermann
fe4695f92a
Merge branch 'added_time_proxy_plugin' of https://github.com/jcorporation/MPD
2023-11-26 08:20:18 +01:00
Max Kellermann
08a5768764
fs/io/TextFile: split into class FileLineReader and AutoGunzipFileLineReader
...
Detangle dependencies.
2023-11-25 22:50:32 +01:00
jcorporation
45a4fcab1e
Add support for added attribute to proxy plugin
2023-11-02 21:22:48 +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
gd
432675d4c2
Stickers: added support for stickers on playlists and some tag types
2023-10-15 11:25:16 +02:00
Max Kellermann
1f495efb46
test/LoadDatabase: ignore tag/charset mismatches
...
This program shouldn't fail just because the configuration doesn't
match - it has no configuration, it's just a dumb test program.
2023-09-07 09:54:03 +02:00
Max Kellermann
2f4e2935a3
db/upnp, playlist/pls: use AddItem(std::string_view)
2023-09-06 16:08:42 +02:00
Max Kellermann
c96e8ab47c
db/simple/DirectorySave: optimize duplicate checks with std::set
...
This reduces the CPU usage for loading a large database by more than 50%.
2023-09-06 14:56:41 +02:00
Max Kellermann
2c4ef4460f
db/update/SpecialDirectory: more std::string_view migration
2023-09-06 14:51:37 +02:00
Max Kellermann
449d59af2f
db/simple/Directory: use operator== to compare strings
2023-09-06 14:30:08 +02:00
Max Kellermann
851136e6fd
db/simple/Directory: GetName() returns std::string_view
2023-09-06 14:29:32 +02:00
Max Kellermann
ad854e9867
db/simple/Save: initialize array without memset()
2023-09-06 14:17:07 +02:00
jcorporation
082f72dd20
Add support of TAG_MUSICBRAINZ_RELEASEGROUPID
...
Closes #1767
2023-07-12 19:43:37 +02:00
Max Kellermann
7bb251dad8
db/update/Walk: use marker to remove deleted items
...
This eliminates all `Storage::GetInfo()` calls from
`UpdateWalk::PurgeDeletedFromDirectory()` and instead uses a "marker"
field to mark items that have been visited; later, all unmarked items
can be deleted.
This eliminates a lot of redundant I/O which is noticable with the
`curl` storage plugin (i.e. WebDAV).
2023-05-22 20:13:01 +02:00
Max Kellermann
9027e5c5bb
release v0.23.13
...
-----BEGIN PGP SIGNATURE-----
iQJBBAABCgArFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmRrqn4NHG1heEBibGFy
Zy5kZQAKCRAjbopYxttFErXiD/9QIaeO5d+U7BJK1yGkQgu5vHo4Pm34ewP8LTxs
K2MYxQQ2jZc7PXqi5Z04wmUw8ymq1BVA2D0ytMdl1Ejcbrste7UrP+1TuD8L9JBj
WCE+4otNVYDpx1PB32BN+gxCmJqiFtAQS+eMIz/SXdEXZ9sJvIgYRRkSiSFd0WHM
dT3OeeZ0V8cANbXpgI+RLghRGkVdpZJo4uXh3c0OHog1fjEBWPw6+7tH/mkotM0n
/hQjI5j14wnzZuIpkDR1kuzvGYmxJKG6LkuUqcm1WexNFbxMqDSbAlXeCmzJn7eK
NQvtROOGNjQ84thxRPLlDlYa6vbxoTqdYgZsVHzsQZWejhqw8zsPsF+Ea0A4tkLd
UKDQFTphZMVqx74+1u7IjQyW7x+k02iXWLwH2IheEl+BJhvEB7zEflN9TR81jek4
RrGx7jcTArdpt7okAe2ONkHvTYtIpaK5E2voza8K4TGOMzpkVlOkyvJ+rpn8CDRf
w0faVvmCQdSrgHKfwUUY8Z47a7d+kkKpFLlvvzNoDV8drQXfgIj5t9HOLATSVVux
l2pbgauXFsKyd4IsByXj+m8cBSvmy2C4eLJCsmguiZEvcobdJtzwOr4KuwQDjBsC
8HW0BD0t9S1dSL59vJdMG+CfK/QU5rmAIkxdydD42uo9UmSS78xw1uQgi9oDaPa8
XNCGdQ==
=nOGh
-----END PGP SIGNATURE-----
Merge tag 'v0.23.13'
release v0.23.13
2023-05-22 19:52:08 +02:00
Max Kellermann
068cd559e1
db/update/Walk: clear Song::in_playlist
...
Without clearing all `in_playlist` flags, the songs will never be
revealed again if they were hidden once by a CUE sheet, not even after
the CUE sheet gets deleted or modified.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1784
2023-05-22 15:41:58 +02:00
Max Kellermann
1417578b3d
db/update/Archive: validate directory names
...
Fixes assertion failure if the ZIP file contains a path that begins
with a slash.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1793
2023-05-21 20:57:38 +02:00
Max Kellermann
96befa138c
db/update/Archive: ignore filenames with newline character
2023-05-21 20:56:38 +02:00
Max Kellermann
16a99804de
db/update/Archive: move check to IsAcceptableFilename()
2023-05-21 20:56:32 +02:00
Max Kellermann
75a39ed279
db/update/Archive: remove useless log message
2023-05-21 20:55:59 +02:00
datasone
d4f3dd49b4
db/SimpleDatabasePlugin: store in_playlist
value of songs into database
...
Fixes hide_playlist_targets not working after server restart
Currently, `hide_playlists_targets` works by skipping songs with
`in_playlist` value set to true in
[`Directory::Walk`](a57bcd0238/src/db/plugins/simple/Directory.cxx (L237)
). But
`in_playlist` is not stored and only updated in
[`UpdateWalk::PurgeDanglingFromPlaylists`](a57bcd0238/src/db/update/Playlist.cxx (L139)
),
which will only be executed while updating DB.
This causes the problem that playlist target songs are correctly
hidden after database update, but will remain visible after mpd server
restarted. This pr solves the problem by storing `in_playlist` value
of songs into the `SimpleDatabase` file.
2023-05-21 20:51:47 +02:00
Max Kellermann
31dc8b73b7
db/update/Archive: validate directory names
...
Fixes assertion failure if the ZIP file contains a path that begins
with a slash.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1793
2023-04-30 08:46:52 +02:00
Max Kellermann
e84db4f411
db/update/Archive: ignore filenames with newline character
2023-04-30 08:45:34 +02:00
Max Kellermann
395bf34a91
db/update/Archive: move check to IsAcceptableFilename()
2023-04-30 08:42:16 +02:00
Max Kellermann
dcc7628b67
db/update/Archive: remove useless log message
2023-04-30 08:39:34 +02:00
Max Kellermann
f2a4ae15aa
db/update: pass filenames as std::string_view
2023-04-30 08:28:43 +02:00
Max Kellermann
434bcb08ee
db/simple/Song: pass std::string_view to Load{File,FromArchive}()
2023-04-30 08:21:20 +02:00
datasone
838b19c2b5
db/SimpleDatabasePlugin: store in_playlist
value of songs into database
...
Fixes hide_playlist_targets not working after server restart
Currently, `hide_playlists_targets` works by skipping songs with
`in_playlist` value set to true in
[`Directory::Walk`](a57bcd0238/src/db/plugins/simple/Directory.cxx (L237)
). But
`in_playlist` is not stored and only updated in
[`UpdateWalk::PurgeDanglingFromPlaylists`](a57bcd0238/src/db/update/Playlist.cxx (L139)
),
which will only be executed while updating DB.
This causes the problem that playlist target songs are correctly
hidden after database update, but will remain visible after mpd server
restarted. This pr solves the problem by storing `in_playlist` value
of songs into the `SimpleDatabase` file.
2023-04-12 05:18:21 +02:00
Max Kellermann
8b77da545d
*: use transparent comparison for std::{map,set} with std::string keys
...
This avoids many std::string temporaries for lookups.
2023-03-12 09:12:02 +01:00
Max Kellermann
5388759bd5
db/proxy: require libmpdclient 2.15 or later
2023-03-10 13:45:37 +01:00
Max Kellermann
e927655774
db/proxy: require MPD 0.21 or later
2023-03-10 13:43:49 +01:00
Max Kellermann
815b248990
*/Registry: use constinit
2023-03-07 12:04:16 +01:00
Max Kellermann
415de497d3
use more libfmt instead of sprintf()
2023-03-06 19:50:53 +01:00
Max Kellermann
b5d224ce22
fs/{StandardDirectory,CheckFile}: move to fs/glue/
...
Distangle library dependencies.
2023-03-06 19:43:09 +01:00
Max Kellermann
8f41e05a39
db/upnp/ContentDirectoryService: use fmt::format_int
2023-03-06 16:45:59 +01: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
118b76a8f1
db/Interface, ...: forward-declare TagType
2023-03-06 15:25:30 +01:00
Max Kellermann
a302d34f6d
tag/Names: convert to C++
2023-03-06 15:16:33 +01:00
Max Kellermann
148aca23be
use SPDX IDs, replacing the long copyright headers
2023-03-06 14:59:48 +01:00