1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-14 18:35:16 +01:00

Don't reset a song's rating back to 0 if it was edited in the EditTagDialog

This commit is contained in:
David Sansome 2012-03-04 13:34:49 +00:00
parent a315bb41f6
commit b53578c490
2 changed files with 4 additions and 2 deletions

View File

@ -295,7 +295,6 @@ void TagReaderWorker::ReadFile(const QString& filename,
SetDefault(bitrate);
SetDefault(samplerate);
SetDefault(lastplayed);
SetDefault(rating);
#undef SetDefault
}

View File

@ -400,7 +400,6 @@ void Song::InitFromProtobuf(const pb::tagreader::SongMetadata& pb) {
d->genre_ = QStringFromStdString(pb.genre());
d->comment_ = QStringFromStdString(pb.comment());
d->compilation_ = pb.compilation();
d->rating_ = pb.rating();
d->playcount_ = pb.playcount();
d->skipcount_ = pb.skipcount();
d->lastplayed_ = pb.lastplayed();
@ -416,6 +415,10 @@ void Song::InitFromProtobuf(const pb::tagreader::SongMetadata& pb) {
d->suspicious_tags_ = pb.suspicious_tags();
d->art_automatic_ = QStringFromStdString(pb.art_automatic());
d->filetype_ = static_cast<FileType>(pb.type());
if (pb.has_rating()) {
d->rating_ = pb.rating();
}
}
void Song::ToProtobuf(pb::tagreader::SongMetadata* pb) const {