Reload playcount from tagreader only if it is set

This commit is contained in:
Chocobozzz 2015-12-19 19:42:52 +01:00
parent 4db358aabb
commit dfdb21cd61
1 changed files with 4 additions and 1 deletions

View File

@ -512,7 +512,6 @@ void Song::InitFromProtobuf(const pb::tagreader::SongMetadata& pb) {
d->genre_ = QStringFromStdString(pb.genre());
d->comment_ = QStringFromStdString(pb.comment());
d->compilation_ = pb.compilation();
d->playcount_ = pb.playcount();
d->skipcount_ = pb.skipcount();
d->lastplayed_ = pb.lastplayed();
d->score_ = pb.score();
@ -536,6 +535,10 @@ void Song::InitFromProtobuf(const pb::tagreader::SongMetadata& pb) {
d->rating_ = pb.rating();
}
if (pb.has_playcount()) {
d->playcount_ = pb.playcount();
}
InitArtManual();
}