aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-desktop/desktop-plugins/rssreader
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-04-21 08:31:59 -0400
committerKen Moore <ken@ixsystems.com>2017-04-21 08:31:59 -0400
commitb268090fdbedf9bf36be41c561c5817b69a6f11a (patch)
tree123de1e2f2631db855406dbd9c769c608e06b0ff /src-qt5/core/lumina-desktop/desktop-plugins/rssreader
parentGet the local file playlist mostly-working. (diff)
downloadlumina-b268090fdbedf9bf36be41c561c5817b69a6f11a.tar.gz
lumina-b268090fdbedf9bf36be41c561c5817b69a6f11a.tar.bz2
lumina-b268090fdbedf9bf36be41c561c5817b69a6f11a.zip
Make the RSS reader a bit more relaxed about the RSS return format (make feed description optional). Also ensure that the sync all option forcibly re-sends all feed requests.
Diffstat (limited to 'src-qt5/core/lumina-desktop/desktop-plugins/rssreader')
-rw-r--r--src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp
index 0a805252..cd29d5f0 100644
--- a/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp
+++ b/src-qt5/core/lumina-desktop/desktop-plugins/rssreader/RSSObjects.cpp
@@ -79,6 +79,7 @@ void RSSReader::removeUrl(QString ID){
// PUBLIC SLOTS
//=================
void RSSReader::syncNow(){
+ outstandingURLS.clear();
QStringList urls = hash.keys();
for(int i=0; i<urls.length(); i++){
requestRSS(hash[urls[i]].originalURL);
@@ -245,11 +246,12 @@ void RSSReader::replyFinished(QNetworkReply *reply){
//RSS reply
RSSchannel info = readRSS(data); //QNetworkReply can be used as QIODevice
reply->deleteLater(); //clean up
- //Validate the info and announce any changes
- if(info.title.isEmpty() || info.link.isEmpty() || info.description.isEmpty()){
- qDebug() << "Missing XML Information:" << url << info.title << info.link << info.description;
+ //Validate the info and announce any changes (4/21/17 - make the description optional even if RSS format requires it - Ken Moore)
+ if(info.title.isEmpty() || info.link.isEmpty() ){
+ qDebug() << "Missing XML Information:" << url << info.title << info.link;
return;
} //bad info/read
+
//Update the bookkeeping elements of the info
if(info.timetolive<=0){ info.timetolive = LSession::handle()->DesktopPluginSettings()->value(setprefix+"default_interval_minutes", 60).toInt(); }
if(info.timetolive <=0){ info.timetolive = 60; } //error in integer conversion from settings?
bgstack15