From a91fba6a3d84d033084fd9461b12b66df86e7f22 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 16 Feb 2021 13:47:24 +0100 Subject: [PATCH 1/3] increment version number to 0.22.6 --- NEWS | 2 ++ android/AndroidManifest.xml | 4 ++-- doc/conf.py | 2 +- meson.build | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 13d1ddd96..3bb20b3c9 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +ver 0.22.6 (not yet released) + ver 0.22.5 (2021/02/15) * protocol - error for malformed ranges instead of ignoring silently diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 1baa1b9cf..e5624c7dd 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="54" + android:versionName="0.22.6"> diff --git a/doc/conf.py b/doc/conf.py index 74aeb31ba..ecbee92c1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -38,7 +38,7 @@ author = 'Max Kellermann' # built documents. # # The short X.Y version. -version = '0.22.5' +version = '0.22.6' # The full version, including alpha/beta/rc tags. release = version diff --git a/meson.build b/meson.build index 50383d13a..c709eec70 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'mpd', ['c', 'cpp'], - version: '0.22.5', + version: '0.22.6', meson_version: '>= 0.49.0', default_options: [ 'c_std=c11', From 80531ef8d801e3dc8e59afa1fd70d4710a80d358 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 16 Feb 2021 13:47:22 +0100 Subject: [PATCH 2/3] 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 --- NEWS | 1 + src/db/plugins/simple/ExportedSong.hxx | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 3bb20b3c9..8a0e7101a 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ver 0.22.6 (not yet released) +* fix missing tags on songs in queue ver 0.22.5 (2021/02/15) * protocol diff --git a/src/db/plugins/simple/ExportedSong.hxx b/src/db/plugins/simple/ExportedSong.hxx index 37e4109b5..9a2d54a85 100644 --- a/src/db/plugins/simple/ExportedSong.hxx +++ b/src/db/plugins/simple/ExportedSong.hxx @@ -29,6 +29,12 @@ * a #LightSong, e.g. a merged #Tag. */ class ExportedSong : public LightSong { + /** + * A reference target for LightSong::tag, but it is only used + * if this instance "owns" the #Tag. For instances referring + * to a foreign #Tag instance (e.g. a Song::tag), this field + * is not used (and empty). + */ Tag tag_buffer; public: @@ -42,10 +48,20 @@ public: points to this instance's #Tag field instead of leaving a dangling reference to the source object's #Tag field */ ExportedSong(ExportedSong &&src) noexcept - :LightSong(src, tag_buffer), + :LightSong(src, + /* refer to tag_buffer only if the + moved-from instance also owned the Tag + which its LightSong::tag field refers + to */ + OwnsTag() ? tag_buffer : src.tag), tag_buffer(std::move(src.tag_buffer)) {} ExportedSong &operator=(ExportedSong &&) = delete; + +private: + bool OwnsTag() const noexcept { + return &tag == &tag_buffer; + } }; #endif From 938728820b11d4544a071994fe3c63c6ab710e8e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 16 Feb 2021 13:56:14 +0100 Subject: [PATCH 3/3] release v0.22.6 --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 8a0e7101a..d751cf09a 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -ver 0.22.6 (not yet released) +ver 0.22.6 (2021/02/16) * fix missing tags on songs in queue ver 0.22.5 (2021/02/15)