Skip to content

Commit

Permalink
Move stream listings to github.
Browse files Browse the repository at this point in the history
  • Loading branch information
CDrummond committed Nov 1, 2016
1 parent 69e7396 commit b573c7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
file path can be used with MPRIS.
33. Fix scrobbling when Album is empty.
34. Fix duration of last track for split CUE files.
35. Move stream listings to github.

2.0.1
-----
Expand Down
11 changes: 7 additions & 4 deletions streams/streamproviderlistdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

//#define TEST_PROVIDERS

static const QLatin1String constProverListUrl("https://googledrive.com/host/0Bzghs6gQWi60dHBPajNjbjExZzQ");
static const QLatin1String constProviderBaseUrl("https://raw.githubusercontent.com/CDrummond/cantata-extra/master/streams/2.1/");

static QString fileMd5(const QString &fileName)
{
Expand Down Expand Up @@ -188,7 +188,7 @@ void StreamProviderListDialog::getProviderList()
readProviders(&f);
}
#else
job=NetworkAccessManager::self()->get(QUrl(constProverListUrl));
job=NetworkAccessManager::self()->get(QUrl(constProviderBaseUrl+"list.xml"));
connect(job, SIGNAL(finished()), this, SLOT(jobFinished()));
spinner->start();
msgOverlay->setText(i18n("Downloading list..."), -1, false);
Expand Down Expand Up @@ -293,8 +293,11 @@ void StreamProviderListDialog::readProviders(QIODevice *dev)
currentCat=doc.attributes().value("type").toString().toInt();
} else if (QLatin1String("provider")==doc.name()) {
QString name=doc.attributes().value("name").toString();
QString url=doc.attributes().value("url").toString();
if (!name.isEmpty() && !url.isEmpty() && currentCat>=0 && currentCat<Cat_Total) {
if (!name.isEmpty() && currentCat>=0 && currentCat<Cat_Total) {
QString url=doc.attributes().value("url").toString();
if (url.isEmpty()) {
url=constProviderBaseUrl+name+".streams.gz";
}
QTreeWidgetItem *cat=0;
if (!categories.contains(currentCat)) {
cat=new QTreeWidgetItem(tree, QStringList() << catName(currentCat));
Expand Down

0 comments on commit b573c7c

Please sign in to comment.