@@ -68,7 +68,7 @@ std::string AlbumArtProvider::get_lastfm_url(const albuminfo &ai) {
68 loop.exec();
68 loop.exec();
70 if (reply->error() != QNetworkReply::NoError) {
70 if (reply->error() != QNetworkReply::NoError) {
71− qDebug() << "Error getting the XML:" << reply->errorString();
71+ qWarning() << "Error getting the XML:" << reply->errorString();
72 return "";
72 return "";
@@ -82,6 +82,12 @@ std::string AlbumArtProvider::get_lastfm_url(const albuminfo &ai) {
82 query.evaluateTo(&image);
82 query.evaluateTo(&image);
83 image = image.trimmed();
83 image = image.trimmed();
85+ // return empty if last.fm tries to offer their default
87+ if (image.contains("catalogue/noimage")) {
85 return image.toStdString();
91 return image.toStdString();
@@ -96,17 +102,17 @@ bool AlbumArtProvider::download_and_store(const std::string &image_url, const st
96 loop.exec();
102 loop.exec();
98 if (reply->error() != QNetworkReply::NoError) {
104 if (reply->error() != QNetworkReply::NoError) {
99− qDebug() << "Error getting the image:" << reply->errorString();
105+ qWarning() << "Error getting the image:" << reply->errorString();
100 return false;
106 return false;
103 QFile file(fileName);
109 QFile file(fileName);
104 if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
110 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();
106 return false;
112 return false;
108 if (file.write(reply->readAll()) == -1){
114 if (file.write(reply->readAll()) == -1){
109− qDebug() << "Could not write the image:" << file.error();
115+ qWarning() << "Could not write the image:" << file.error();
110 return false;
116 return false;