Example #1
0
 def __init__(self):
     super().__init__('Mpd')
     self._player = None
     self._init_address()
     self._client = None
     self._player_info = PlayerInfo(name=PLAYER_NAME,
                                    appname='mpd',
                                    binname='mpd',
                                    cmd='mpd')
     self._player = None
     self._io_watch = None
     self._fetch_queue = []
     self._on_idle = False
Example #2
0
 def do_list_active_players(self):
     ret = []
     for v in self._players.values():
         ret.append(PlayerInfo(v.name))
     return ret
Example #3
0
def player_info_from_name(name):
    return PlayerInfo(name, icon=name)
Example #4
0
 def do_list_active_players(self):
     return [PlayerInfo(v.name) for v in self._players.values()]
Example #5
0
def player_info_from_name(name):
    """ Returns a dict representing a player info by the given name
    """
    return PlayerInfo(name, icon=name)