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
8681a3d74c
replace TextFile references with LineReader
2021-12-03 14:22:56 +01:00
Max Kellermann
c729f16dcd
song/DetachedSong: copy the AudioFormat from LightSong
...
Enables the "Format" row in "playlistinfo" responses.
https://github.com/MusicPlayerDaemon/MPD/issues/1094
2021-02-18 22:16:11 +01:00
Max Kellermann
5348f8c9c8
copyright year 2021
2021-01-01 19:54:28 +01:00
Max Kellermann
2817bf9e95
copyright year 2020
2020-01-18 19:23:49 +01:00
Max Kellermann
5fdb804a50
db/simple/Song: add attribute "target"
...
Will be used for Song objects representing tracks inside a CUE file.
2019-09-08 00:32: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
a1e2602c3d
SongSave: allow throwing any exception
2019-09-05 20:58:00 +02:00
Max Kellermann
a139279575
Copyright year 2019
2019-06-17 11:17:30 +02:00
Max Kellermann
f5c9071494
*: copyright year 2018
2018-10-31 17:54:59 +01:00
Max Kellermann
72b6c09a73
db/simple: add an AudioFormat to each Song
2018-07-06 22:49:02 +02:00
Max Kellermann
75582d47b9
SongSave: wrap DetachedSong* in std::unique_ptr
2017-11-26 12:18:31 +01:00
Max Kellermann
5900253b85
update copyright year
2017-01-03 20:48:59 +01:00
Max Kellermann
22dcca9832
util/Error: remove obsolete class
2016-11-10 12:58:26 +01:00
Max Kellermann
90a14e14f4
db/simple/Save: migrate from class Error to C++ exceptions
2016-10-29 09:45:34 +02:00
Max Kellermann
1aee89f5ea
*: include cleanup (using iwyu)
2016-03-01 22:08:13 +01:00
Max Kellermann
1d67aa7bf2
update copyright year to 2016
2016-02-26 17:54:05 +01:00
Max Kellermann
712ed555e6
Copyright year 2015
2015-01-01 19:48:13 +01:00
Max Kellermann
9fb351a139
*Save, *State: use the OutputStream API instead of FILE*
2014-07-30 22:17:01 +02:00
Max Kellermann
4f83c60296
copyright year 2014
2014-01-13 22:31:55 +01:00
Max Kellermann
322b061632
DetachedSong: fork of struct Song
...
From now on, struct Song will be used by the database only, and
DetachedSong will be used by everybody else. DetachedSong is easier
to use, but Song has lower overhead.
2014-01-09 09:05:58 +01:00
Max Kellermann
ff626ac763
*: use references instead of pointers
2013-10-19 18:48:38 +02:00
Max Kellermann
29030b54c9
util/Error: new error passing library
...
Replaces GLib's GError.
2013-09-04 18:14:22 +02:00
Max Kellermann
ba161ec572
song: convert header to C++
2013-07-28 13:25:12 +02:00
Max Kellermann
5ed9f02c4d
TagPool, ...: include cleanup
2013-01-30 22:53:12 +01:00
Max Kellermann
90fe4c5124
TextFile: convert to a class
2013-01-03 10:16:05 +01:00
Max Kellermann
3e8047e583
Directory: rename struct directory to Directory
2013-01-03 01:10:47 +01:00
Max Kellermann
b715e522cf
db_save, state_file: convert to C++
2013-01-02 20:22:59 +01:00