def autostart(reason, **kwargs): global rssPoller # Instanciate when autostart active, session present and enigma2 is launching if config.plugins.simpleRSS.autostart.value and \ kwargs.has_key("session") and reason == 0: from RSSPoller import RSSPoller rssPoller = RSSPoller() elif reason == 1: if rssPoller is not None: rssPoller.shutdown() rssPoller = None
def autostart(reason, **kwargs): global rssPoller # Instanciate when enigma2 is launching, autostart active and session present or installed during runtime if reason == 0 and config.plugins.simpleRSS.autostart.value and \ (not plugins.firstRun or kwargs.has_key("session")): from RSSPoller import RSSPoller rssPoller = RSSPoller() elif reason == 1: if rssPoller is not None: rssPoller.shutdown() rssPoller = None
def autostart(reason, **kwargs): global rssPoller if "session" in kwargs and config.plugins.simpleRSS.update_notification.value == "ticker": import RSSTickerView as tv if tv.tickerView is None: tv.tickerView = kwargs["session"].instantiateDialog(tv.RSSTickerView) # Instanciate when enigma2 is launching, autostart active and session present or installed during runtime if reason == 0 and config.plugins.simpleRSS.autostart.value and \ (not plugins.firstRun or "session" in kwargs): from RSSPoller import RSSPoller rssPoller = RSSPoller() elif reason == 1: if rssPoller is not None: rssPoller.shutdown() rssPoller = None
def main(session, **kwargs): # Get Global rssPoller-Object global rssPoller # Create one if we have none (no autostart) if rssPoller is None: from RSSPoller import RSSPoller rssPoller = RSSPoller() # Show Overview when we have feeds (or retrieving them from google) if rssPoller.feeds or config.plugins.simpleRSS.enable_google_reader.value: from RSSScreens import RSSOverview session.openWithCallback(closed, RSSOverview, rssPoller) # Show Setup otherwise else: from RSSSetup import RSSSetup session.openWithCallback(closed, RSSSetup, rssPoller)
def main(session, **kwargs): # Get Global rssPoller-Object global rssPoller # Create one if we have none (no autostart) if rssPoller is None: from RSSPoller import RSSPoller rssPoller = RSSPoller() # Show Overview when we have feeds if rssPoller.feeds: from RSSScreens import RSSOverview session.openWithCallback(closed, RSSOverview, rssPoller) # Show Setup otherwise else: from RSSSetup import RSSSetup session.openWithCallback(closed, RSSSetup, rssPoller)