New screen alongside clock/weather/navidrome. Upload goes through the web UI (validated with PIL before accepting, stored under web/static/uploads/, gitignored), or point it at a URL re-fetched every 30 minutes. Cover/contain fit modes (new fit_cover/fit_contain helpers in render_utils.py, generalized from the square-only cover-art cropping already used by the Navidrome screen), plus the same contrast-boost/grayscale options that screen has.
16 lines
445 B
Python
16 lines
445 B
Python
from screens.clock import ClockScreen
|
|
from screens.navidrome import NavidromeScreen
|
|
from screens.picture import PictureScreen
|
|
from screens.weather import WeatherScreen
|
|
|
|
SCREEN_CLASSES = {
|
|
ClockScreen.id: ClockScreen,
|
|
WeatherScreen.id: WeatherScreen,
|
|
PictureScreen.id: PictureScreen,
|
|
NavidromeScreen.id: NavidromeScreen,
|
|
}
|
|
|
|
|
|
def create_screens() -> dict:
|
|
return {screen_id: cls() for screen_id, cls in SCREEN_CLASSES.items()}
|