Scale the missing cover image in the Edit Tag dialog, and don't overwrite the art_automatic field when reloading metadata.
This commit is contained in:
parent
57865f82c2
commit
413f3b5186
@ -394,9 +394,12 @@ void Song::InitFromProtobuf(const pb::tagreader::SongMetadata& pb) {
|
||||
d->ctime_ = pb.ctime();
|
||||
d->filesize_ = pb.filesize();
|
||||
d->suspicious_tags_ = pb.suspicious_tags();
|
||||
d->art_automatic_ = QStringFromStdString(pb.art_automatic());
|
||||
d->filetype_ = static_cast<FileType>(pb.type());
|
||||
|
||||
if (pb.has_art_automatic()) {
|
||||
d->art_automatic_ = QStringFromStdString(pb.art_automatic());
|
||||
}
|
||||
|
||||
if (pb.has_rating()) {
|
||||
d->rating_ = pb.rating();
|
||||
}
|
||||
|
@ -60,7 +60,8 @@ EditTagDialog::EditTagDialog(Application* app, QWidget* parent)
|
||||
cover_art_is_set_(false),
|
||||
results_dialog_(new TrackSelectionDialog(this))
|
||||
{
|
||||
cover_options_.default_output_image_ = QImage(":nocover.png");
|
||||
cover_options_.default_output_image_ =
|
||||
AlbumCoverLoader::ScaleAndPad(cover_options_, QImage(":nocover.png"));
|
||||
|
||||
connect(app_->album_cover_loader(), SIGNAL(ImageLoaded(quint64,QImage,QImage)),
|
||||
SLOT(ArtLoaded(quint64,QImage,QImage)));
|
||||
@ -433,7 +434,7 @@ void EditTagDialog::UpdateSummaryTab(const Song& song) {
|
||||
} else if (song.has_embedded_cover()) {
|
||||
summary += Qt::escape(tr("Cover art from embedded image"));
|
||||
} else if (!song.art_automatic().isEmpty()) {
|
||||
summary += Qt::escape(tr("Cover art loaded automatically from %1").arg(song.art_manual()));
|
||||
summary += Qt::escape(tr("Cover art loaded automatically from %1").arg(song.art_automatic()));
|
||||
} else {
|
||||
summary += Qt::escape(tr("Cover art not set"));
|
||||
art_is_set = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user