aboutsummaryrefslogtreecommitdiff
path: root/helpers/actions/pause.py
blob: bb27734ce764611e5d6a8517df87d7b5df0ca282 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
def run(action, music=None, **kwargs):
    for music in action.music_list(music):
        if music.is_loaded_playing():
            music.pause()

def description(action, music=None, **kwargs):
    if music is not None:
        return "pausing « {} »".format(music.name)
    else:
        return "pausing all musics"