Fix year - album collection grouping

Fixes #534
This commit is contained in:
Jonas Kvinge 2020-09-05 17:26:42 +02:00
parent 9db148b1ec
commit da51580299
1 changed files with 2 additions and 0 deletions

View File

@ -1250,6 +1250,7 @@ CollectionItem *CollectionModel::ItemFromSong(const GroupBy type, const bool sig
int year = qMax(0, s.year());
item->metadata.set_year(year);
item->metadata.set_album(s.album());
item->metadata.set_grouping(s.grouping());
item->key = PrettyYearAlbum(year, s.album());
item->sort_text = SortTextForNumber(year) + s.grouping() + s.album();
break;
@ -1261,6 +1262,7 @@ CollectionItem *CollectionModel::ItemFromSong(const GroupBy type, const bool sig
item->metadata.set_year(year);
item->metadata.set_originalyear(originalyear);
item->metadata.set_album(s.album());
item->metadata.set_grouping(s.grouping());
item->key = PrettyYearAlbum(effective_originalyear, s.album());
item->sort_text = SortTextForNumber(effective_originalyear) + s.grouping() + s.album();
break;