From e361af3eedf63169f3bccbd9ada77106aeb3107e Mon Sep 17 00:00:00 2001 From: Pander Date: Sun, 7 Feb 2016 20:06:03 +0100 Subject: [PATCH] Support also highest quality playlist --- src/internet/intergalacticfm/intergalacticfmservice.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/internet/intergalacticfm/intergalacticfmservice.cpp b/src/internet/intergalacticfm/intergalacticfmservice.cpp index 3fc76fa14..e562c395a 100644 --- a/src/internet/intergalacticfm/intergalacticfmservice.cpp +++ b/src/internet/intergalacticfm/intergalacticfmservice.cpp @@ -157,6 +157,7 @@ void IntergalacticFMServiceBase::RefreshStreamsFinished(QNetworkReply* reply, void IntergalacticFMServiceBase::ReadChannel(QXmlStreamReader& reader, StreamList* ret) { Stream stream; + bool found = false; while (!reader.atEnd()) { switch (reader.readNext()) { @@ -176,6 +177,14 @@ void IntergalacticFMServiceBase::ReadChannel(QXmlStreamReader& reader, StreamLis QUrl url(reader.readElementText()); 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; } else { Utilities::ConsumeCurrentElement(&reader);