Check for empty art automatic

This commit is contained in:
Jonas Kvinge 2021-03-07 05:41:49 +01:00
parent cff25374b5
commit 89f1f8e6dc
1 changed files with 2 additions and 1 deletions

View File

@ -794,7 +794,8 @@ void Song::InitFromProtobuf(const spb::tagreader::SongMetadata &pb) {
}
if (pb.has_art_automatic()) {
set_art_automatic(QUrl::fromLocalFile(QByteArray(pb.art_automatic().data(), pb.art_automatic().size())));
QByteArray art_automatic(pb.art_automatic().data(), pb.art_automatic().size());
if (!art_automatic.isEmpty()) set_art_automatic(QUrl::fromLocalFile(art_automatic));
}
InitArtManual();