@@ -68,7 +68,7 @@ std::string AlbumArtProvider::get_lastfm_url(const albuminfo &ai) {
6868 loop.exec();
6969
7070 if (reply->error() != QNetworkReply::NoError) {
71− qDebug() << "Error getting the XML:" << reply->errorString();
71+ qWarning() << "Error getting the XML:" << reply->errorString();
7272 return "";
7373 }
7474
@@ -82,6 +82,12 @@ std::string AlbumArtProvider::get_lastfm_url(const albuminfo &ai) {
8282 query.evaluateTo(&image);
8383 image = image.trimmed();
8484
85+ // return empty if last.fm tries to offer their default
86+ // fallback artwork
87+ if (image.contains("catalogue/noimage")) {
88+ return "";
89+ }
90+
8591 return image.toStdString();
8692}
8793
@@ -96,17 +102,17 @@ bool AlbumArtProvider::download_and_store(const std::string &image_url, const st
96102 loop.exec();
97103
98104 if (reply->error() != QNetworkReply::NoError) {
99− qDebug() << "Error getting the image:" << reply->errorString();
105+ qWarning() << "Error getting the image:" << reply->errorString();
100106 return false;
101107 }
102108
103109 QFile file(fileName);
104110 if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
105− qDebug() << "Could not open file for writing:" << file.errorString();
111+ qWarning() << "Could not open file for writing:" << file.errorString();
106112 return false;
107113 }
108114 if (file.write(reply->readAll()) == -1){
109− qDebug() << "Could not write the image:" << file.error();
115+ qWarning() << "Could not write the image:" << file.error();
110116 return false;
111117 }
112118