Add option for overwriting database rating

This commit is contained in:
Jonas Kvinge
2021-10-31 23:24:32 +01:00
parent b41957ce5c
commit ca10920bb5
7 changed files with 17 additions and 6 deletions

View File

@@ -1680,13 +1680,13 @@ void Song::ToXesam(QVariantMap *map) const {
}
void Song::MergeUserSetData(const Song &other) {
void Song::MergeUserSetData(const Song &other, const bool merge_rating) {
if (other.playcount() > 0) {
set_playcount(other.playcount());
}
if (other.rating() > 0) {
if (merge_rating && other.rating() > 0.0F) {
set_rating(other.rating());
}