(_request: WSGIRequest)
Pauses the current song if it is playing.
    No-op if already paused.
Pauses the current song if it is playing.
    No-op if already paused.
Pauses the current song if it is playing . No - op if already paused .
def pause(_request: WSGIRequest) -> None:
    """Pauses the current song if it is playing.
    No-op if already paused."""
    with playback.mopidy_command() as allowed:
        if allowed:
            player.playback.pause()
    try:
        current_song = models.CurrentSong.objects.get()
        current_song.last_paused = timezone.now()
        current_song.save()
    except models.CurrentSong.DoesNotExist:
        pass
    storage.set("paused", True)
def pause ( _request : WSGIRequest ) -> None : with playback . mopidy_command ( ) as allowed : if allowed : player . playback . pause ( ) try : current_song = models . CurrentSong . objects . get ( ) current_song . last_paused = timezone . now ( ) current_song . save ( ) except models . CurrentSong . DoesNotExist : pass storage . set ( "paused" , True )