|
|
@ -221,28 +221,29 @@ RssArticlePtr xmlToRssArticle(RssFeed* parent, QXmlStreamReader& xml) |
|
|
|
QDateTime date; |
|
|
|
QDateTime date; |
|
|
|
QString author; |
|
|
|
QString author; |
|
|
|
|
|
|
|
|
|
|
|
Q_ASSERT(xml.isStartElement() && xml.name() == "item"); |
|
|
|
while(!xml.atEnd()) { |
|
|
|
|
|
|
|
xml.readNext(); |
|
|
|
|
|
|
|
|
|
|
|
while (xml.readNextStartElement()) { |
|
|
|
if(xml.isEndElement() && xml.name() == "item") |
|
|
|
if (xml.name() == "title") |
|
|
|
break; |
|
|
|
title = xml.readElementText(); |
|
|
|
|
|
|
|
else if (xml.name() == "enclosure") { |
|
|
|
if (xml.isStartElement()) { |
|
|
|
if (xml.attributes().value("type") == "application/x-bittorrent") |
|
|
|
if (xml.name() == "title") |
|
|
|
torrentUrl = xml.attributes().value("url").toString(); |
|
|
|
title = xml.readElementText(); |
|
|
|
} |
|
|
|
else if (xml.name() == "enclosure") { |
|
|
|
else if (xml.name() == "link") |
|
|
|
if (xml.attributes().value("type") == "application/x-bittorrent") |
|
|
|
link = xml.readElementText(); |
|
|
|
torrentUrl = xml.attributes().value("url").toString(); |
|
|
|
else if (xml.name() == "description") |
|
|
|
} |
|
|
|
description = xml.readElementText(); |
|
|
|
else if (xml.name() == "link") |
|
|
|
else if (xml.name() == "pubDate") |
|
|
|
link = xml.readElementText(); |
|
|
|
date = RssArticle::parseDate(xml.readElementText()); |
|
|
|
else if (xml.name() == "description") |
|
|
|
else if (xml.name() == "author") |
|
|
|
description = xml.readElementText(); |
|
|
|
author = xml.readElementText(); |
|
|
|
else if (xml.name() == "pubDate") |
|
|
|
else if (xml.name() == "guid") |
|
|
|
date = RssArticle::parseDate(xml.readElementText()); |
|
|
|
guid = xml.readElementText(); |
|
|
|
else if (xml.name() == "author") |
|
|
|
else { |
|
|
|
author = xml.readElementText(); |
|
|
|
qDebug() << "Skipping item tag: " << xml.name(); |
|
|
|
else if (xml.name() == "guid") |
|
|
|
xml.skipCurrentElement(); |
|
|
|
guid = xml.readElementText(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|