(request: WSGIRequest)
Enables or disables autoplay depending on the given value.
    If enabled and the current song is the last one,
    a new song is enqueued, based on the current one.
Enables or disables autoplay depending on the given value.
    If enabled and the current song is the last one,
    a new song is enqueued, based on the current one.
Enables or disables autoplay depending on the given value . If enabled and the current song is the last one a new song is enqueued based on the current one .
def set_autoplay(request: WSGIRequest) -> None:
    """Enables or disables autoplay depending on the given value.
    If enabled and the current song is the last one,
    a new song is enqueued, based on the current one."""
    enabled = request.POST.get("value") == "true"
    storage.set("autoplay", enabled)
    playback.handle_autoplay()
def set_autoplay ( request : WSGIRequest ) -> None : enabled = request . POST . get ( "value" ) == "true" storage . set ( "autoplay" , enabled ) playback . handle_autoplay ( )