summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeneticdrift <geneticdrift@iotide.com>2020-04-22 21:55:02 +0200
committerMax Kellermann <max@musicpd.org>2020-04-22 22:00:38 +0200
commit0a92fbc18e9ae84ca088f96078acd8705269bec9 (patch)
tree004e5172b40683054e48dfa31eafb170b6a0aa03
parent138c29320be50e212396735941094f555ce5ce0c (diff)
tag/Fallback: add tag fallback for AlbumSort
Closes https://github.com/MusicPlayerDaemon/MPD/issues/832
-rw-r--r--NEWS2
-rw-r--r--src/tag/Fallback.hxx4
2 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 68b2e5558..264ac1737 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,6 @@
ver 0.21.23 (not yet released)
+* protocol
+ - add tag fallback for AlbumSort
* storage
- curl: fix corrupt "href" values in the presence of XML entities
- curl: unescape "href" values
diff --git a/src/tag/Fallback.hxx b/src/tag/Fallback.hxx
index ecbe0d439..fb07fc1e8 100644
--- a/src/tag/Fallback.hxx
+++ b/src/tag/Fallback.hxx
@@ -45,6 +45,10 @@ ApplyTagFallback(TagType type, F &&f) noexcept
"AlbumArtist"/"ArtistSort" was found */
return f(TAG_ARTIST);
+ if (type == TAG_ALBUM_SORT)
+ /* fall back to "Album" if no "AlbumSort" was found */
+ return f(TAG_ALBUM);
+
return false;
}