Browse Source

[RSS] Handle more types of RSS feeds

adaptive-webui-19844
ngosang 9 years ago
parent
commit
ee21562426
  1. 6
      src/gui/rss/rssparser.cpp

6
src/gui/rss/rssparser.cpp

@ -277,6 +277,9 @@ void RssParser::parseRssArticle(QXmlStreamReader& xml, const QString& feedUrl) @@ -277,6 +277,9 @@ void RssParser::parseRssArticle(QXmlStreamReader& xml, const QString& feedUrl)
}
}
if (!article.contains("torrent_url") && article.contains("news_link"))
article["torrent_url"] = article["news_link"];
if (!article.contains("id")) {
// Item does not have a guid, fall back to some other identifier
const QString link = article.value("news_link").toString();
@ -397,6 +400,9 @@ void RssParser::parseAtomArticle(QXmlStreamReader& xml, const QString& feedUrl, @@ -397,6 +400,9 @@ void RssParser::parseAtomArticle(QXmlStreamReader& xml, const QString& feedUrl,
}
}
if (!article.contains("torrent_url") && article.contains("news_link"))
article["torrent_url"] = article["news_link"];
if (!article.contains("id")) {
// Item does not have a guid, fall back to some other identifier
const QString link = article.value("news_link").toString();

Loading…
Cancel
Save