tag/Fallback: add tag fallback for AlbumSort

Closes https://github.com/MusicPlayerDaemon/MPD/issues/832
This commit is contained in:
geneticdrift 2020-04-22 21:55:02 +02:00 committed by Max Kellermann
parent 138c29320b
commit 0a92fbc18e
2 changed files with 6 additions and 0 deletions

2
NEWS
View File

@ -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

View File

@ -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;
}