From e6640f1d102814f1fd1768b0b45ed791ea98eb23 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Fri, 9 Mar 2012 18:58:05 +0000 Subject: [PATCH] Fix a parse error on RSS feeds that had non-self atom links --- src/podcasts/podcastparser.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/podcasts/podcastparser.cpp b/src/podcasts/podcastparser.cpp index c86b76c35..4cbc2d7a6 100644 --- a/src/podcasts/podcastparser.cpp +++ b/src/podcasts/podcastparser.cpp @@ -104,10 +104,9 @@ void PodcastParser::ParseChannel(QXmlStreamReader* reader, Podcast* ret) const { ParseImage(reader, ret); } else if (name == "copyright") { ret->set_copyright(reader->readElementText()); - } else if (name == "link" && reader->namespaceUri() == kAtomNamespace) { - if (ret->url().isEmpty() && reader->attributes().value("rel") == "self") { - ret->set_url(QUrl(reader->readElementText())); - } + } else if (name == "link" && reader->namespaceUri() == kAtomNamespace && + ret->url().isEmpty() && reader->attributes().value("rel") == "self") { + ret->set_url(QUrl(reader->readElementText())); } else if (name == "item") { ParseItem(reader, ret); } else {