def __init__(self, standalone=False): """ init the upsoon plugin """ _debug_('upsoon.PluginInterface.__init__()', 2) plugin.DaemonPlugin.__init__(self) plugin.register(self, 'upsoon') self.standalone = standalone self.lock = thread.allocate_lock() self.running = True self.timer = Timer(self.timer_handler).start(15) self.event = EventHandler(self.event_handler) #self.event.register(('VIDEO_START', 'VIDEO_END')) self.event.register() self.recordclient = RecordClient() self.fc = FreevoChannels() self.rdev = config.RADIO_DEVICE self.next_program = None self.seconds_before_announce = 120 self.seconds_before_start = 60 self.pending_lockfile = config.FREEVO_CACHEDIR + '/record.soon' self.tv_lockfile = None # lockfile of recordserver self.stopped = None # flag that tells upsoon what stopped
def __init__(self, standalone=False): """ init the upsoon plugin """ logger.log( 9, 'upsoon.PluginInterface.__init__()') plugin.DaemonPlugin.__init__(self) plugin.register(self, 'upsoon') self.standalone = standalone self.lock = thread.allocate_lock() self.running = True self.timer = Timer(self.timer_handler).start(15) self.event = EventHandler(self.event_handler) #self.event.register(('VIDEO_START', 'VIDEO_END')) self.event.register() self.recordclient = RecordClient() self.fc = FreevoChannels() self.rdev = config.RADIO_DEVICE self.next_program = None self.announced = False self.seconds_before_announce = config.TV_UPSOON_ANNOUNCE self.seconds_before_start = config.TV_UPSOON_BEFORE_START self.pending_lockfile = config.FREEVO_CACHEDIR + '/record.soon' self.tv_lockfile = None # lockfile of recordserver self.stopped = None # flag that tells upsoon what stopped if os.path.exists(self.pending_lockfile): os.remove(self.pending_lockfile) logger.debug('%r lockfile removed', self.pending_lockfile)
def __init__(self): logger.log( 9, 'detach.PluginInterface.__init__()') plugin.MainMenuPlugin.__init__(self) config.EVENTS['audio'][config.DETACH_KEY] = Event(FUNCTION_CALL, arg=self.detach) self.show_item = menu.MenuItem(_('Show player'), action=self.show) self.show_item.type = 'detached_player' self.event = EventHandler(self._event_handler) self.event.register()
def __init__(self): """ init the events plug-in """ plugin.DaemonPlugin.__init__(self) plugin.register(self, 'processevent') self.plugin_name = 'processevent' self.event = EventHandler(self.event_handler) self.event.register()
def __init__(self): """ Init the autostart timeout and the plugin variables """ plugin.DaemonPlugin.__init__(self) self.active = True self.timer = OneShotTimer(self._timer_handler) self.event = EventHandler(self._event_handler) self.event.register()
def __init__(self): """initialise the DaemonPlugin interface""" logger.log(9, 'detachbar.PluginInterface.__init__()') plugin.DaemonPlugin.__init__(self) self.plugin_name = 'audio.detachbar' self.player = None self.event = EventHandler(self._event_handler) self.event.register() self.state = DIALOG_NOTSET self.dialog = None self.update(DIALOG_HIDE)
def __init__(self): """initialise the DaemonPlugin interface""" logger.log(9, 'detachbar.PluginInterface.__init__()') plugin.DaemonPlugin.__init__(self) self.plugin_name = 'audio.detachbar' self.player = None self.timer = Timer(self._timer_handler) self.event = EventHandler(self._event_handler) self.event.register() self.state = BAR_NOTSET self.update(BAR_HIDE) # tunables self.wait_timeout = 3 # 3 seconds till we hide the bar