Dont seperate compilation albums by directory in GetAlbums

Fixes issue where multi-disc albums are showing more than once in cover
manager.
This commit is contained in:
Jonas Kvinge 2020-09-10 21:27:07 +02:00
parent 2d2ce191ec
commit cac01fbde9
1 changed files with 1 additions and 9 deletions

View File

@ -1022,12 +1022,8 @@ CollectionBackend::AlbumList CollectionBackend::GetAlbums(const QString &artist,
bool is_compilation = query.Value(4).toBool();
Album info;
QString directory;
info.first_url = QUrl::fromEncoded(query.Value(0).toByteArray());
if (is_compilation) {
directory = info.first_url.toString(QUrl::PreferLocalFile|QUrl::RemoveFilename);
}
else {
if (!is_compilation) {
info.artist = query.Value(1).toString();
info.album_artist = query.Value(2).toString();
}
@ -1054,10 +1050,6 @@ CollectionBackend::AlbumList CollectionBackend::GetAlbums(const QString &artist,
if (!effective_albumartist.isEmpty()) {
key.append(effective_albumartist);
}
if (!directory.isEmpty()) {
if (!key.isEmpty()) key.append("-");
key.append(directory);
}
if (!info.album_name.isEmpty()) {
if (!key.isEmpty()) key.append("-");
key.append(info.album_name);