Пример #1
0
 def __init__(self):
     self.group_id = active_group_store.get_active_group()
     self.playing_id = None
     self.playing_type = None
     self.playing_shuffle = False
     self.paused = False
     self.soco = list(soco.discover())[0]
Пример #2
0
def volume(value):
    group_id = active_group_store.get_active_group()
    if value:
        if value[0] in ('+', '-'):
            set_group_relative_volume(group_id, value)
        else:
            set_group_volume(group_id, value)
    else:
        result = get_group_volume(group_id)
        click.echo(result['volume'])
Пример #3
0
def volume(value):
    group_id = active_group_store.get_active_group()
    if value:
        if value[0] in ("+", "-"):
            set_group_relative_volume(group_id, value)
        else:
            set_group_volume(group_id, value)
    else:
        result = get_group_volume(group_id)
        click.echo(result["volume"])
Пример #4
0
    def __init__(self):
        self.config = Config()
        self.group_id = active_group_store.get_active_group()
        self.playing_id = None
        self.playing_type = None
        self.playing_shuffle = False
        self.paused = False

        self._zones_cached = None
        self._zones = []
Пример #5
0
def next():
    group_id = active_group_store.get_active_group()
    control.skip_to_next_track(group_id)
Пример #6
0
def pause():
    group_id = active_group_store.get_active_group()
    control.pause(group_id)
Пример #7
0
def status():
    group_id = active_group_store.get_active_group()
    return control.status(group_id)
Пример #8
0
def play(playlist_id):
    group_id = active_group_store.get_active_group()
    if playlist_id:
        control.load_playlist(group_id, playlist_id, play_on_completion=True)
    else:
        control.play(group_id)
Пример #9
0
def prev():
    group_id = active_group_store.get_active_group()
    control.skip_to_previous_track(group_id)