(_request: WSGIRequest)
return HttpResponse()
Adjusts the resolution of the screen.
Adjusts the resolution of the screen.
Adjusts the resolution of the screen .
def adjust_screen(_request: WSGIRequest) -> HttpResponse:
    """Adjusts the resolution of the screen."""
    if storage.get("screen_program") != "Disabled":
        return HttpResponseBadRequest("Disable the screen program before readjusting")
    # _notify_settings_changed("adjust_screen")
    # After disabling the screen program, it cannot be started again
    # (pi3d only shows the black background)
    # We restart the lights worker so the library is reloaded,
    # allowing the screen program to be shown again.
    # During initialization, the screen will adjust itself.
    redis.publish("lights_settings_changed", "stop")
    worker.start()

    return HttpResponse()
def adjust_screen ( _request : WSGIRequest ) -> HttpResponse : if storage . get ( "screen_program" ) != "Disabled" : return HttpResponseBadRequest ( "Disable the screen program before readjusting" ) # _notify_settings_changed("adjust_screen") # After disabling the screen program, it cannot be started again # (pi3d only shows the black background) # We restart the lights worker so the library is reloaded, # allowing the screen program to be shown again. # During initialization, the screen will adjust itself. redis . publish ( "lights_settings_changed" , "stop" ) worker . start ( ) return HttpResponse ( )