def play(): global sleeper if player.paused: sleeper = start_sleeper(player.length - player.time_pos) player.pause()
def play(): """Play the music if currently paused.""" global sleeper if player.paused: sleeper = start_sleeper(player.length - player.time_pos) player.pause()
def pause(): if not player.paused: sleeper.kill() player.pause()
def pause(): """Pause the playlist if playing.""" if not player.paused: sleeper.kill() player.pause()