--- ../../dreambox/apps/tuxbox/plugins/enigma/rss/rss.cpp 2006-06-25 18:19:17.000000000 +0200 +++ rss.cpp 2008-06-07 15:58:15.000000000 +0200 @@ -1,6 +1,7 @@ /* Dreambox RSS reader Copyright (C) 2004 Bjorn Hijmans (bjorn@hijmans.nl) +Copyright (C) 2008 Andrea Musuruane (musuruan@gmail.com) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -603,7 +604,7 @@ if (strcmp(encoding,"windows-1254")==0){ sprintf(encoding,"ISO-8859-9"); } - for (int i=0;iGetType(), "feed")) + { NewsItem thisItem; + int idcnt = 0; + + for(XMLTreeNode * node = root->GetChild(); node; node = node->GetNext()) + { if(!strcmp(node->GetType(), "entry")) + { for(XMLTreeNode * i = node->GetChild(); i; i = i->GetNext()) + { if(!strcmp(i->GetType(), "title")) + { eString title = i->GetData(); + eString type = i->GetAttributeValue("type"); + replace_sonderzeichen((char *)title.c_str()); + if (type.icompare("text") != 0) + { + title.strReplace("\n"," "); + title.strReplace("\r"," "); + title = removeTags(title); + } + thisItem.title = title; + } + if(!strcmp(i->GetType(), "content")) + { eString desc = i->GetData(); + eString type = i->GetAttributeValue("type"); + replace_sonderzeichen((char *)desc.c_str()); + if (type.icompare("text") != 0) + { + desc.strReplace("\n"," "); + desc.strReplace("\r"," "); + desc = removeTags(desc); + } + thisItem.description = desc; + } + if(!strcmp(i->GetType(), "summary") && !thisItem.description.icompare("")) + { eString desc = i->GetData(); + eString type = i->GetAttributeValue("type"); + replace_sonderzeichen((char *)desc.c_str()); + if (type.icompare("text") != 0) + { + desc.strReplace("\n"," "); + desc.strReplace("\r"," "); + desc = removeTags(desc); + } + thisItem.description = desc; + } + } + thisItem.id = idcnt++; + save(thisItem); + } + } + } else { eString sMsg = eString().sprintf("Unknown file format (%s)", root->GetType()); eMessageBox msg(sMsg, _("Error"), eMessageBox::iconWarning|eMessageBox::btOK);