from Screens.MessageBox import MessageBox
from Components.ActionMap import ActionMap
from Components.GUIComponent import GUIComponent
-from Components.Label import Label
from Components.MultiContent import MultiContentEntryText
from Plugins.Plugin import PluginDescriptor
-from enigma import eListboxPythonMultiContent, eListbox, gFont, iServiceInformation, RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_WRAP
+from enigma import eListboxPythonMultiContent, eListbox, gFont, RT_HALIGN_LEFT, RT_WRAP
-from twisted.web import server
-from twisted.web.resource import Resource
from twisted.web.client import getPage
import xml.dom.minidom
my_global_session = None
-urls = ["http://www.heise.de/newsticker/heise.rdf", "http://rss.slashdot.org/Slashdot/slashdot/to"]
+#urls = ["http://www.heise.de/newsticker/heise.rdf", "http://rss.slashdot.org/Slashdot/slashdot/to"]
+urls = ["http://mastermaq.podcastspot.com/episodes/rss/mpg1"]
from Components.config import config, ConfigSubsection, ConfigSelection, getConfigListEntry
-from Components.ConfigList import ConfigList, ConfigListScreen
+from Components.ConfigList import ConfigListScreen
config.simpleRSS = ConfigSubsection()
config.simpleRSS.hostname = ConfigSelection(choices = urls)
</screen>"""
def __init__(self, session, args = None):
- from Tools.BoundFunction import boundFunction
-
print "screen init"
Screen.__init__(self, session)
self.skin = SimpleRSS.skin
def __init__(self):
self.poll_timer = eTimer()
- self.poll_timer.timeout.get().append(self.poll)
+ self.poll_timer.callback.append(self.poll)
self.poll_timer.start(0, 1)
self.last_links = Set()
self.dialog = None
self.d = getPage(config.simpleRSS.hostname.value).addCallback(self._gotPage).addErrback(self.error)
def shutdown(self):
- self.poll_timer.timeout.get().remove(self.poll)
+ self.poll_timer.callback.remove(self.poll)
self.poll_timer = None
-def main(session):
+def main(session, **kwargs):
print "session.open"
session.open(SimpleRSS)
print "done"
def Plugins(**kwargs):
return [ PluginDescriptor(name="RSS Reader", description="A (really) simple RSS reader", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main),
PluginDescriptor(where = [PluginDescriptor.WHERE_SESSIONSTART, PluginDescriptor.WHERE_AUTOSTART], fnc = autostart),
- PluginDescriptor(name="View RSS", description="Let's you view current RSS entries", where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=showCurrent) ]
+ PluginDescriptor(name="View RSS", description="Lets you view current RSS entries", where = PluginDescriptor.WHERE_EXTENSIONSMENU, fnc=showCurrent) ]