Remove htbackdrops.com code - as doesn't look like this is comming back!
This commit is contained in:
@@ -636,35 +636,13 @@ void ContextWidget::getBackdrop()
|
||||
cancel();
|
||||
if (artistsCreatedBackdropsFor.contains(currentArtist)) {
|
||||
createBackdrop();
|
||||
} else /*if (useHtBackdrops) {
|
||||
getHtBackdrop();
|
||||
} else*/ if (useFanArt) {
|
||||
} else if (useFanArt) {
|
||||
getFanArtBackdrop();
|
||||
} else {
|
||||
getDiscoGsImage();
|
||||
}
|
||||
}
|
||||
|
||||
//void ContextWidget::getHtBackdrop()
|
||||
//{
|
||||
// QUrl url("http://htbackdrops.com/api/"+constHtbApiKey+"/searchXML");
|
||||
// #if QT_VERSION < 0x050000
|
||||
// QUrl &q=url;
|
||||
// #else
|
||||
// QUrlQuery q;
|
||||
// #endif
|
||||
|
||||
// q.addQueryItem(QLatin1String("keywords"), fixArtist(currentArtist));
|
||||
// q.addQueryItem(QLatin1String("default_operator"), QLatin1String("and"));
|
||||
// q.addQueryItem(QLatin1String("fields"), QLatin1String("title"));
|
||||
// #if QT_VERSION >= 0x050000
|
||||
// url.setQuery(q);
|
||||
// #endif
|
||||
// job=NetworkAccessManager::self()->get(url, 5000);
|
||||
// DBUG << url.toString();
|
||||
// connect(job, SIGNAL(finished()), this, SLOT(htBackdropsResponse()));
|
||||
//}
|
||||
|
||||
void ContextWidget::getFanArtBackdrop()
|
||||
{
|
||||
// First we need to query musicbrainz to get id
|
||||
@@ -716,57 +694,6 @@ void ContextWidget::getDiscoGsImage()
|
||||
connect(job, SIGNAL(finished()), this, SLOT(discoGsResponse()));
|
||||
}
|
||||
|
||||
//void ContextWidget::htBackdropsResponse()
|
||||
//{
|
||||
// NetworkJob *reply = getReply(sender());
|
||||
// if (!reply) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// DBUG << "status" << reply->error() << reply->errorString();
|
||||
|
||||
// QString id;
|
||||
// if (reply->ok()) {
|
||||
// QXmlStreamReader xml(reply);
|
||||
// while (!xml.atEnd() && !xml.hasError() && id.isEmpty()) {
|
||||
// xml.readNext();
|
||||
// if (xml.isStartElement() && QLatin1String("search")==xml.name()) {
|
||||
// while (xml.readNextStartElement() && id.isEmpty()) {
|
||||
// if (xml.isStartElement() && QLatin1String("images")==xml.name()) {
|
||||
// while (xml.readNextStartElement() && id.isEmpty()) {
|
||||
// if (xml.isStartElement() && QLatin1String("image")==xml.name()) {
|
||||
// while (xml.readNextStartElement() && id.isEmpty()) {
|
||||
// if (xml.isStartElement() && QLatin1String("id")==xml.name()) {
|
||||
// id=xml.readElementText();
|
||||
// } else {
|
||||
// xml.skipCurrentElement();
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// xml.skipCurrentElement();
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// xml.skipCurrentElement();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } else if (NetworkJob::OperationCanceledError==reply->error()) {
|
||||
// // We timed out, someting wrong with htbackdrops? Jsut use auto-generated backdrops for now...
|
||||
// useHtBackdrops=false;
|
||||
// }
|
||||
|
||||
// if (id.isEmpty()) {
|
||||
// getDiscoGsImage();
|
||||
// } else {
|
||||
// QUrl url("http://htbackdrops.com/api/"+constHtbApiKey+"/download/"+id+"/fullsize");
|
||||
// job=NetworkAccessManager::self()->get(url);
|
||||
// DBUG << url.toString();
|
||||
// connect(job, SIGNAL(finished()), this, SLOT(downloadResponse()));
|
||||
// }
|
||||
//}
|
||||
|
||||
void ContextWidget::musicbrainzResponse()
|
||||
{
|
||||
NetworkJob *reply = getReply(sender());
|
||||
|
||||
@@ -64,7 +64,6 @@ public:
|
||||
static void enableDebug();
|
||||
|
||||
static const QLatin1String constCacheDir;
|
||||
// static const QLatin1String constHtbApiKey;
|
||||
static const QLatin1String constFanArtApiKey;
|
||||
|
||||
ContextWidget(QWidget *parent=0);
|
||||
@@ -88,7 +87,6 @@ Q_SIGNALS:
|
||||
void createBackdrop(const QString &artist, const QList<Song> &songs);
|
||||
|
||||
private Q_SLOTS:
|
||||
// void htBackdropsResponse();
|
||||
void musicbrainzResponse();
|
||||
void fanArtResponse();
|
||||
void discoGsResponse();
|
||||
@@ -103,7 +101,6 @@ private:
|
||||
void cancel();
|
||||
void updateBackdrop();
|
||||
void getBackdrop();
|
||||
// void getHtBackdrop();
|
||||
void getFanArtBackdrop();
|
||||
void getMusicbrainzId(const QString &artist);
|
||||
void getDiscoGsImage();
|
||||
@@ -116,7 +113,6 @@ private:
|
||||
bool alwaysCollapsed;
|
||||
bool drawBackdrop;
|
||||
bool darkBackground;
|
||||
// bool useHtBackdrops;
|
||||
bool useFanArt;
|
||||
bool albumCoverBackdrop;
|
||||
Song currentSong;
|
||||
|
||||
@@ -238,9 +238,6 @@ int main(int argc, char *argv[])
|
||||
aboutData.addAuthor(ki18n("Roeland Douma"), ki18n("QtMPC author"), QByteArray(), "http://qtmpc.lowblog.nl");
|
||||
aboutData.addAuthor(ki18n("Daniel Selinger"), ki18n("QtMPC author"), QByteArray(), "http://qtmpc.lowblog.nl");
|
||||
aboutData.addAuthor(ki18n("Armin Walland"), ki18n("QtMPC author"), QByteArray(), "http://qtmpc.lowblog.nl");
|
||||
// if (ContextWidget::constHtbApiKey.latin1()) {
|
||||
// aboutData.addCredit(ki18n("Home Theater Backdrops"), ki18n("Context view backdrops"), QByteArray(), "www.htbackdrops.com");
|
||||
// }
|
||||
aboutData.addCredit(ki18n("FanArt.tv"), ki18n("Context view backdrops (please consider uploading your own music fan-art to fanart.tv)"), QByteArray(), "www.fanart.tv");
|
||||
aboutData.addCredit(ki18n("Wikipedia"), ki18n("Context view metadata"), QByteArray(), "www.wikipedia.org");
|
||||
aboutData.addCredit(ki18n("Last.fm"), ki18n("Context view metadata"), QByteArray(), "www.last.fm");
|
||||
|
||||
Reference in New Issue
Block a user