Song: Only merge user set playcount and rating if set

Fixes #790
This commit is contained in:
Jonas Kvinge 2021-10-18 00:39:26 +02:00
parent c78252e0d5
commit bd4eec4527
1 changed files with 8 additions and 2 deletions

View File

@ -1680,12 +1680,18 @@ void Song::ToXesam(QVariantMap *map) const {
void Song::MergeUserSetData(const Song &other) {
set_playcount(other.playcount());
if (other.playcount() > 0) {
set_playcount(other.playcount());
}
if (other.rating() > 0) {
set_rating(other.rating());
}
set_skipcount(other.skipcount());
set_lastplayed(other.lastplayed());
set_art_manual(other.art_manual());
set_compilation_on(other.compilation_on());
set_compilation_off(other.compilation_off());
set_rating(other.rating());
}