Support also highest quality playlist

This commit is contained in:
Pander 2016-02-07 20:06:03 +01:00
parent 646983d6a9
commit e361af3eed
1 changed files with 9 additions and 0 deletions

View File

@ -157,6 +157,7 @@ void IntergalacticFMServiceBase::RefreshStreamsFinished(QNetworkReply* reply,
void IntergalacticFMServiceBase::ReadChannel(QXmlStreamReader& reader, StreamList* ret) { void IntergalacticFMServiceBase::ReadChannel(QXmlStreamReader& reader, StreamList* ret) {
Stream stream; Stream stream;
bool found = false;
while (!reader.atEnd()) { while (!reader.atEnd()) {
switch (reader.readNext()) { switch (reader.readNext()) {
@ -176,6 +177,14 @@ void IntergalacticFMServiceBase::ReadChannel(QXmlStreamReader& reader, StreamLis
QUrl url(reader.readElementText()); QUrl url(reader.readElementText());
url.setScheme(url_handler_->scheme()); url.setScheme(url_handler_->scheme());
stream.url_ = url;
found = true;
} else if (found == false &&
reader.name() == "highestpls" &&
reader.attributes().value("format") == "mp3") {
QUrl url(reader.readElementText());
url.setScheme(url_handler_->scheme());
stream.url_ = url; stream.url_ = url;
} else { } else {
Utilities::ConsumeCurrentElement(&reader); Utilities::ConsumeCurrentElement(&reader);