From e1a6fc09afc088dcb67263ed5923f5be41c32c31 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Sun, 25 May 2025 21:38:37 -0500 Subject: use lazy caching texture list to limit number of images loaded at one time --- pix.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pix.py') diff --git a/pix.py b/pix.py index aa1495f..4064892 100644 --- a/pix.py +++ b/pix.py @@ -3,6 +3,7 @@ import signal from threading import Thread from OpenGL.GLUT import glutLeaveMainLoop +from lazycachelist import LazyCachingTextureList from window import PixDisplay from immich import ImmichConnector from flaskapi import app @@ -19,10 +20,12 @@ def handle_sigint(sig, frame): if __name__ == "__main__": - pd = PixDisplay() immich_connector = ImmichConnector("http://192.168.1.13", "m5nqOoBc4uhAba21gZdCP3z8D3JT4GPxDXL2psd52EA") + album_keys = [ "38617851-6b57-44f1-b5f7-82577606afc4" ] + lazy_texture_list = LazyCachingTextureList(immich_connector, album_keys, 30) + pd = PixDisplay(lazy_texture_list) - t1 = Thread(target=immich_connector.idle, daemon=True, args=(pd,)) + t1 = Thread(target=immich_connector.idle, daemon=True) t1.start() app.config["pix_display"] = pd -- cgit v1.2.3