(_request: WSGIRequest)
Restarts the current song from the beginning.
Restarts the current song from the beginning.
Restarts the current song from the beginning .
def restart(_request: WSGIRequest) -> None:
    """Restarts the current song from the beginning."""
    with playback.mopidy_command() as allowed:
        if allowed:
            player.playback.seek(0)
    try:
        current_song = models.CurrentSong.objects.get()
        current_song.created = timezone.now()
        current_song.save()
    except models.CurrentSong.DoesNotExist:
        pass
def restart ( _request : WSGIRequest ) -> None : with playback . mopidy_command ( ) as allowed : if allowed : player . playback . seek ( 0 ) try : current_song = models . CurrentSong . objects . get ( ) current_song . created = timezone . now ( ) current_song . save ( ) except models . CurrentSong . DoesNotExist : pass