Merge pull request #5161 from Chocobozzz/master

Reload playcount from tagreader only if it is set
This commit is contained in:
John Maguire 2015-12-21 18:48:32 +00:00
commit 7555913b0c
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();
}