(_request: WSGIRequest)
Jumps back in the current song.
Jumps back in the current song.
Jumps back in the current song .
def seek_backward(_request: WSGIRequest) -> None:
    """Jumps back in the current song."""
    with playback.mopidy_command() as allowed:
        if allowed:
            current_position = player.playback.get_time_position()
            player.playback.seek(current_position - SEEK_DISTANCE * 1000)
    try:
        current_song = models.CurrentSong.objects.get()
        now = timezone.now()
        current_song.created += datetime.timedelta(seconds=SEEK_DISTANCE)
        current_song.created = min(current_song.created, now)
        current_song.save()
    except models.CurrentSong.DoesNotExist:
        pass
def seek_backward ( _request : WSGIRequest ) -> None : with playback . mopidy_command ( ) as allowed : if allowed : current_position = player . playback . get_time_position ( ) player . playback . seek ( current_position - SEEK_DISTANCE * 1000 ) try : current_song = models . CurrentSong . objects . get ( ) now = timezone . now ( ) current_song . created += datetime . timedelta ( seconds = SEEK_DISTANCE ) current_song . created = min ( current_song . created , now ) current_song . save ( ) except models . CurrentSong . DoesNotExist : pass