summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--android/AndroidManifest.xml4
-rw-r--r--doc/conf.py2
-rw-r--r--src/db/plugins/simple/ExportedSong.hxx18
4 files changed, 23 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 3e6a86a3c..1dc977395 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ ver 0.23 (not yet released)
* protocol
- new command "getvol"
+ver 0.22.6 (2021/02/16)
+* fix missing tags on songs in queue
+
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 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.musicpd"
android:installLocation="auto"
- android:versionCode="53"
- android:versionName="0.22.5">
+ android:versionCode="54"
+ android:versionName="0.22.6">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29"/>
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/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