diff --git a/gui/coverdialog.cpp b/gui/coverdialog.cpp index c58d31b1e..4ae983ed6 100644 --- a/gui/coverdialog.cpp +++ b/gui/coverdialog.cpp @@ -84,9 +84,10 @@ public: // Type_Discogs }; - CoverItem(const QString &u, QListWidget *parent) + CoverItem(const QString &u, const QString &tu, QListWidget *parent) : QListWidgetItem(parent) , imgUrl(u) + , thmbUrl(tu) , list(parent) { setSizeHint(parent->gridSize()); setTextAlignment(Qt::AlignHCenter | Qt::AlignTop); @@ -95,6 +96,7 @@ public: virtual quint32 key() const =0; virtual Type type() const =0; const QString & url() const { return imgUrl; } + const QString & thumbUrl() const { return thmbUrl; } //bool operator<(const CoverItem &o) const { // return key()property(constLargeProperty).toString(), img, list); + item=new LastFmCover(reply->property(constLargeProperty).toString(), url, img, list); } else if (constGoogleHost==host) { - item=new GoogleCover(reply->property(constLargeProperty).toString(), img, + item=new GoogleCover(reply->property(constLargeProperty).toString(), url, img, reply->property(constWidthProperty).toInt(), reply->property(constHeightProperty).toInt(), reply->property(constSizeProperty).toInt(), list); } // else if (constYahooHost==host) { -// item=new YahooCover(reply->property(constLargeProperty).toString(), img, list); +// item=new YahooCover(reply->property(constLargeProperty).toString(), url, img, list); // } else if (constDiscogsHost==host) { -// item=new DiscogsCover(reply->property(constLargeProperty).toString(), img, +// item=new DiscogsCover(reply->property(constLargeProperty).toString(), url, img, // reply->property(constWidthProperty).toInt(), reply->property(constHeightProperty).toInt(), list); // } if (item) { @@ -647,6 +650,8 @@ void CoverDialog::sendQuery() if (CoverItem::Type_Existing==item->type() || CoverItem::Type_Local==item->type()) { keep.append(item); } else { + currentUrls.remove(item->url()); + currentUrls.remove(item->thumbUrl()); delete item; } } @@ -706,7 +711,6 @@ void CoverDialog::sendQuery() #endif sendQueryRequest(googleUrl); - // QUrl yahoo; // yahoo.setScheme("http"); // yahoo.setHost(constYahooHost);