Rosen Penev
44378b7dbe
use structured binding declarations
...
Shorter.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-03-04 20:28:02 +01:00
Max Kellermann
80531ef8d8
db/simple: fix ExportedSong move constructor for non-owning sources
...
If the constructor moves from an ExportedSong instance which refers to
somebody else's "Tag" instance, the newly constructed instance will
instead refer to its own empty "tag_buffer" field. This broke
SimpleDatabase::GetSong(), i.e. all songs on the queue restored from
the state file or added using the "addid" command.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1089
2021-02-16 13:52:25 +01:00
Max Kellermann
d4d06da2f8
db/simple: fix dangling LightSong::tag reference in moved ExportedSong
...
After commit 1afa33c3c7
, an old bug was revealed:
SimpleDatabase::GetSong() constructs an ExportedSong instance by
moving the return value of Song::Export(), which causes the
LightSong::tag field to be dangling on the moved-from
ExportedSong::tag_buffer. This broke tags from CUE sheets.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1070
2021-02-15 17:38:37 +01:00
Max Kellermann
1afa33c3c7
db/simple/Song: Export() merges tags with "target"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1048
2021-01-21 13:57:59 +01:00
Max Kellermann
3a7c9c7c84
db/simple/ExportedSong: add option to own a Tag
2021-01-21 13:52:01 +01:00
Max Kellermann
6d08e761c8
db/simple/ExportedSong: new class
2021-01-21 13:52:01 +01:00
Max Kellermann
5348f8c9c8
copyright year 2021
2021-01-01 19:54:28 +01:00
Max Kellermann
92a218b7a9
playlist/registry: add option "as_directory"
...
This allows users to disable the "CUE files as directories" feature
without having to disable the CUE playlist plugin completely. This
feature has been annoying some users.
2020-11-04 16:13:12 +01:00
Max Kellermann
bbfa6fe632
db/simple: purge songs for unavailable decoder plugins on update
2020-10-28 14:36:20 +01:00
Max Kellermann
b5673b6333
db/simple/Directory: add pure
attribute
2020-10-28 14:24:58 +01:00
Max Kellermann
ee802867df
db/update/Walk: add code comments
2020-10-28 14:23:39 +01:00
Max Kellermann
ecaa51e322
db/simple: purge special directories for unavailable plugins on update
2020-10-27 19:14:31 +01:00
Max Kellermann
0779333064
db/update/Walk: adjust lamba indent
2020-10-27 19:14:31 +01:00
Max Kellermann
eeb96eb367
event/TimerEvent: add type alias for std::chrono::steady_clock::duration
2020-10-08 20:48:50 +02:00
Max Kellermann
e9df4116fd
db/upnp: store UPnPDirContent in local variable
...
Fixes use-after-free because the temporary goes out of scope.
2020-09-23 15:25:39 +02:00
Max Kellermann
c843bce9f5
LogLevel: rename DEFAULT to NOTICE
...
"DEFAULT" is a bad name - all it says is that it's the default value,
but it doesn't say what it means. The name NOTICE mimics the syslog
level.
2020-09-23 14:22:33 +02:00
Max Kellermann
0acc398c52
Merge branch 'v0.21.x' into master
2020-09-17 14:44:20 +02:00
Max Kellermann
4c1cfca95b
db/update/InotifyUpdate: pass path by value to recursive_watch_subdirectories()
2020-09-17 14:18:29 +02:00
Max Kellermann
e113ce9621
db/update/InotifyUpdate: obey .mpdignore
files
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/846
2020-09-17 14:17:17 +02:00
Max Kellermann
e8213220e2
db/update/InotifyUpdate: split the WatchDirectory constructor
2020-09-16 21:08:22 +02:00
Max Kellermann
83f9d2a963
db/update/InotifyUpdate: use class DirectoryReader
2020-09-16 21:02:07 +02:00
Max Kellermann
bf97ebf89f
db/update/InotifyUpdate: convert pointer to reference
2020-09-16 20:59:41 +02:00
Max Kellermann
5b22d27cbb
db/update/InotifyUpdate: remove commented log call
2020-09-16 20:59:40 +02:00
Max Kellermann
b18fc3a8d0
db/update/InotifySource: use auto
2020-09-16 20:40:27 +02:00
Max Kellermann
a8e23c4140
db/update/InotifySource: add noexcept
2020-09-16 20:40:06 +02:00
Max Kellermann
fc3861b421
db/update/InotifyQueue: add noexcept
2020-09-16 20:40:03 +02:00
Max Kellermann
e81bb5d8f1
db/update/Inotify*: include cleanup
2020-09-16 20:39:44 +02:00
Max Kellermann
540919f256
*: use nullptr instead of NULL
2020-09-07 20:08:27 +02:00
Max Kellermann
b74a91427d
release v0.21.25
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl8DfoEQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEgVqD/0X+QAV77Pw+RDP7qPtyYDfBH6jOvSpAmHm
moXIFMBaPeIrAFd6jfYTL+JMcVf+jfS6H86JlrWVz5/jerV0St/LxwrTGRqkac8K
OFDmMl2SE2KkniLOTHC2nKq3RFzAKDKK8uCaw3JFpXiAezuRXutX19nHitbau+HC
jD+2Ybyy149fPAB+D6aON6vjZI9hQyyeGoEbducZ5uZz+tvzwY0w1KcnDlaicjJq
Wdu16RFFZNXJnrXQ8hPWTxltgIdRfc9xMrIkydsyQkpW5jLZAJn9Yvl4xIQJhJlb
HlF2/xAUAIqykDqjbxWGnQYywOtCh12XDdn2S2AzAGgNH0z++EBiMyQjLorHf3Eo
wSa/qvi1E5rf8WBCaz3Qa/oa9trj4TQcQFQ+v9esO/yBn3O0K6oGr67P45f1KRqg
SAwnwd+YwYp838lT+MlueD+c67QAY64qCYjI810o3rZ3cyEitWKF6kkvwfzqCfly
HeZJS7OsG1UoxInSfnYwJW1svwtkfZU0WqWHxqKSL/MnwihXhlkhkom8jIS+yYcO
pVPllLvF1H0d/Y2Eb2MH6OKZF+7c5cwSeXJzA808NwzE5dpL2tHAgjxhS/P66voF
/UqLyXySqEaUijp9hW3jEeFJ5TSP2bCaNXnbsQUoM4uqjhkoUi9QLTJIqyG1PKmM
3JKzuZXy2g==
=eK6Y
-----END PGP SIGNATURE-----
Merge tag 'v0.21.25'
release v0.21.25
2020-07-06 21:47:30 +02:00
Max Kellermann
00789de7d4
db/upnp/Object: root nodes are allowed to omit parent_id and name
...
This fixes compatibility with Plex DLNA.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/851
2020-07-06 21:36:30 +02:00
Max Kellermann
9964a5ffe8
db/update/Service: avoid copying the mount point path
2020-07-06 21:09:58 +02:00
Max Kellermann
c3cfb5fe16
Merge branch 'v0.21.x'
2020-07-06 20:56:52 +02:00
Max Kellermann
fe48e5596f
command/storage: automatically scan new mounts
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/841
2020-07-06 20:23:41 +02:00
Max Kellermann
5b291ff768
db/update/Walk: pass concatenated .mpdignore URI to storage.MapUTF8()
...
Fixes the "Unrecognized URI" error with the udisks storage plugin,
which is caused by the kludge in UdisksStorage::MapUTF8().
2020-07-06 17:19:38 +02:00
Max Kellermann
f20b927858
Merge branch 'v0.21.x'
2020-05-30 14:05:18 +02:00
Rosen Penev
e4dad42ca1
use std chr functions
...
The ones in std have overloads for const char/char.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-30 13:36:53 +02:00
Shen-Ta Hsieh
8e07ea7ad8
src/db: fitting libmpdclient interface
2020-05-29 19:00:16 +02:00
Max Kellermann
864d26cd1b
Merge branch 'bind' of git://github.com/neheb/MPD
2020-05-06 06:14:55 +02:00
Max Kellermann
ba576ffa37
Merge branch 'v0.21.x'
2020-05-05 19:00:53 +02:00
Max Kellermann
209364adf2
db/simple: fix crash when mounting twice
...
The `db->close()` call was a `nullptr` dereference because the `db`
variable had already been moved.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/839
2020-05-05 18:57:29 +02:00
Max Kellermann
e0edf0b206
meson.build: move VERSION and others to Version.h
2020-05-05 15:12:11 +02:00
Max Kellermann
9815d10137
system/FileDescriptor: move to io/
2020-05-05 14:27:03 +02:00
Rosen Penev
e6a77e1297
remove std::bind usage as much as possible
...
Reduces unstripped size. stripped size is the same.
Also took the time to remove using std::placeholders.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-04 15:40:28 -07:00
Rosen Penev
3c145c0f49
[clang-tidy] add nodiscard
...
Found with modernize-use-nodiscard
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-04-22 18:20:51 +02:00
Max Kellermann
3c240e2119
db/simple/DirectorySave: pass std::string_view to _load_subdir()
...
Eliminates one strlen() call.
2020-04-08 23:54:58 +02:00
Max Kellermann
57fb153c5d
db/Interface: pass std::string_view to GetSong()
2020-04-08 23:43:59 +02:00
Max Kellermann
212401d687
db/update/Service: pass std::string_view to Enqueue()
2020-04-08 23:38:28 +02:00
Max Kellermann
dd831d3922
db/simple: pass std::string_view to Directory::LookupDirectory()
2020-04-08 23:38:24 +02:00
Max Kellermann
db93bb996c
util/SplitString: convert return value to std::string_view
...
Eliminates lots of overhead.
2020-04-08 23:14:25 +02:00
Max Kellermann
2c02a04566
db/update/Walk: pass std::string_view to DirectoryMakeUriParentChecked()
...
Split the string into path segments with StringView::Split(). This
prepares to eliminate all allocations from the method.
2020-04-08 23:09:37 +02:00