def add_to_queue(self,params): print params if params[self.key] == 'queue_repl': # replacing queue self.mpd.stop() self.mpd.clear() if 'file' in params.keys(): self.mpd.add(params['file']) util.notify(params['file'],__str__(30018)) return if 'art' in params.keys(): files = [] notify = '' if 'album' in params.keys(): files = self.mpd.find('artist',params['art'],'album',params['album']) notify = '%s - %s' % (params['art'],params['album']) else: files = self.mpd.find('artist',params['art']) notify = '%s' % (params['art']) if len(files) > 0: self.mpd.command_list_ok_begin() for f in files: self.mpd.add(f['file']) self.mpd.command_list_end() util.notify(notify,__str__(30018))
def add_to_queue(self, params): print params if params[self.key] == 'queue_repl': # replacing queue self.mpd.stop() self.mpd.clear() if 'file' in params.keys(): self.mpd.add(params['file']) util.notify(params['file'], __str__(30018)) return if 'art' in params.keys(): files = [] notify = '' if 'album' in params.keys(): files = self.mpd.find('artist', params['art'], 'album', params['album']) notify = '%s - %s' % (params['art'], params['album']) else: files = self.mpd.find('artist', params['art']) notify = '%s' % (params['art']) if len(files) > 0: self.mpd.command_list_ok_begin() for f in files: self.mpd.add(f['file']) self.mpd.command_list_end() util.notify(notify, __str__(30018))
def add_to_queue(self,params): print params if params[self.key] == 'queue_repl': # replacing queue self.mpd.stop() self.mpd.clear() self.mpd.add(params['path']) util.notify(params['path'],__str__(30018))
def add_to_queue(self, params): print params if params[self.key] == 'queue_repl': # replacing queue self.mpd.stop() self.mpd.clear() self.mpd.add(params['path']) util.notify(params['path'], __str__(30018))
def add_to_queue(self,params): print params if params[self.key] == 'queue_repl': # replacing queue self.mpd.stop() self.mpd.clear() if 'name' in params.keys(): self.mpd.load(params['name']) util.notify(params['name'],__str__(30018)) elif 'file' in params.keys(): self.mpd.add(params['file']) util.notify(params['file'],__str__(30018))
def add_to_queue(self, params): print params if params[self.key] == 'queue_repl': # replacing queue self.mpd.stop() self.mpd.clear() if 'name' in params.keys(): self.mpd.load(params['name']) util.notify(params['name'], __str__(30018)) elif 'file' in params.keys(): self.mpd.add(params['file']) util.notify(params['file'], __str__(30018))