Example #1
0
def play():
    global sleeper
    if player.paused:
        sleeper = start_sleeper(player.length - player.time_pos)
        player.pause()
Example #2
0
def play():
    """Play the music if currently paused."""
    global sleeper
    if player.paused:
        sleeper = start_sleeper(player.length - player.time_pos)
        player.pause()
Example #3
0
def pause():
    if not player.paused:
        sleeper.kill()
        player.pause()
Example #4
0
def pause():
    """Pause the playlist if playing."""
    if not player.paused:
        sleeper.kill()
        player.pause()