From aac9e3d4b2b7c0bf4bb7c1b6fddb1ea46f926619 Mon Sep 17 00:00:00 2001 From: Miha Lunar Date: Sun, 27 Oct 2024 14:01:58 +0100 Subject: [PATCH] Don't recreate album/timeline scenes on height change --- main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.go b/main.go index b62f723..9655d44 100644 --- a/main.go +++ b/main.go @@ -450,6 +450,13 @@ func (*Api) GetScenes(w http.ResponseWriter, r *http.Request, params openapi.Get } sceneConfig.Collection = collection + // Disregard viewport height for album and timeline layouts + // as they are invariant to it + switch sceneConfig.Layout.Type { + case layout.Album, layout.Timeline: + sceneConfig.Layout.ViewportHeight = 0 + } + scenes := sceneSource.GetScenesWithConfig(sceneConfig) sort.Slice(scenes, func(i, j int) bool { a := scenes[i]