def __init__(self, app, settings): Plugin.__init__(self, app, settings) self._plugin_pmpd = None self._plugin_plcd = None self._connection_string = "http://" + settings["host"] + "/jsonrpc" self.app.add_listener("initialized", self._init)
def __init__(self, app, settings): # TODO add caching of genres + stations Plugin.__init__(self, app, settings) self._plugin_pmpd = None self._plugin_plcd = None self._sc = shoutcast.ShoutCast() self.app.add_listener("initialized", self._add_menu)
def __init__(self, app, settings): Plugin.__init__(self, app, settings) self.directory = settings["root"] self._plugin_raspilcd = None self._add_listeners() self._console_commands = {"listfiles": self._cmd_listfiles} self._add_console_commands()
def __init__(self, app, settings): Plugin.__init__(self, app, settings) self._plugin_raspilcd = None self.app.add_listener("load:plcd", self._load_raspilcd) self.app.add_listener("unload:plcd", self._unload_raspilcd) self.app.console.add_command("set", self._cmd_set) self.app.console.add_command("get", self._cmd_get) self.app.console.add_command("save", self._cmd_save)
def __init__(self, app, settings): Plugin.__init__(self, app, settings) self.flask = Flask("pweb") self.flask.add_url_rule('/', view_func=views.IndexView.as_view('index', plugin=self)) view_audio = views.AudioView.as_view('audio', plugin=self) view_audio.methods = ['GET'] self.flask.add_url_rule('/audio/play/<song_id>', view_func=view_audio, defaults={"cmd": "play"}) self.flask.add_url_rule('/audio/<cmd>', view_func=view_audio) self.app.add_listener("initialized", self._run_flask)
def __init__(self, app, settings): Plugin.__init__(self, app, settings) self.appStack = [] self.lcd = RaspiLCD() self.lcd.backlight = True self.menuApp = MenuApp(self) self.statusApp = AudioStatusApp(self) self.rootApp = self.statusApp self.lcd.event['btn:up'].addListener( self._btnUp ) self.lcd.event['btn:down'].addListener( self._btnDown ) self.lcd.event['btn:left'].addListener( self._btnLeft ) self.lcd.event['btn:right'].addListener( self._btnRight ) self.lcd.event['btn:center'].addListener( self._btnCenter ) self.app.add_listener("initialized", self._run_lcd)
def __init__(self, app, settings): Plugin.__init__(self, app, settings) self.app.console.add_command("play", self._cmd_play) self.app.console.add_command("stop", self._cmd_stop) self.app.console.add_command("next", self._cmd_next) self.app.console.add_command("prev", self._cmd_prev) self.app.console.add_command("status", self._cmd_status) self._client = mpd.MPDClient() self._client.connect(settings["host"], settings["port"]) self.status = None self.playlist = [] self.app.add_listener("initialized", self._run_updater) self.app.add_listener("initialized", self._add_menu) self._lock = threading.Lock()