1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-15 10:48:33 +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(bitrate);
SetDefault(samplerate); SetDefault(samplerate);
SetDefault(lastplayed); SetDefault(lastplayed);
SetDefault(rating);
#undef SetDefault #undef SetDefault
} }

View File

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