diff --git a/subwave_nowplaying.star b/subwave_nowplaying.star index 3f1240e..ba87818 100644 --- a/subwave_nowplaying.star +++ b/subwave_nowplaying.star @@ -112,7 +112,23 @@ DEFAULT_STATIC_OVERLAY = "on" # How far in the album art zoom goes, relative to its fully-zoomed-out rest # state (see _art_widget below for why scale never goes below 1.0). -ZOOM_LEVELS = { +# 1x-only reduction: a busy/high-detail album cover (a "NOW" compilation, +# reports of an overrun with moderate zoom on one) pushed worst-case +# payload up -- the breathing zoom cycling through a wider scale range +# means more genuinely distinct crops to encode over the animation. 2x +# keeps the original values -- confirmed it has more buffer headroom on +# that hardware, per earlier discussion, so this is deliberately not a +# blanket reduction. Verified against a real "NOW"-style compilation +# cover: the reduced "moderate" (1.25) measured ~297-316KB across +# several runs, vs ~329-336KB at the original 1.4 -- a real, repeatable +# margin gain, not just noise from the glitch segment's own randomness. +ZOOM_LEVELS_1X = { + "off": 1.0, + "subtle": 1.1, + "moderate": 1.25, + "strong": 1.45, +} +ZOOM_LEVELS_2X = { "off": 1.0, "subtle": 1.15, "moderate": 1.4, @@ -183,7 +199,8 @@ def main(config): station_url = station_url.rstrip("/") colors = COLOR_SCHEMES.get(config.get("color_scheme", DEFAULT_COLOR_SCHEME), COLOR_SCHEMES[DEFAULT_COLOR_SCHEME]) - zoom_scale = ZOOM_LEVELS.get(config.get("zoom_level", DEFAULT_ZOOM_LEVEL), ZOOM_LEVELS[DEFAULT_ZOOM_LEVEL]) + zoom_levels = ZOOM_LEVELS_2X if scale == 2 else ZOOM_LEVELS_1X + zoom_scale = zoom_levels.get(config.get("zoom_level", DEFAULT_ZOOM_LEVEL), zoom_levels[DEFAULT_ZOOM_LEVEL]) zoom_position = config.get("zoom_position", DEFAULT_ZOOM_POSITION) static_overlay_enabled = config.get("static_overlay", DEFAULT_STATIC_OVERLAY) == "on"