summaryrefslogtreecommitdiff
path: root/lazycachelist.py
diff options
context:
space:
mode:
authorTim Keller <tjk@tjkeller.xyz>2025-06-24 18:56:53 -0500
committerTim Keller <tjk@tjkeller.xyz>2025-06-24 18:56:53 -0500
commit2f03f39e24053377dce108e45fde13ccd1e0ae22 (patch)
treeab7aca31e7433a417b54febf511a76af02c9df7a /lazycachelist.py
parent0b0c1978c4f7b57a240575de56b8e40d29c3c219 (diff)
downloadimmich-frame-2f03f39e24053377dce108e45fde13ccd1e0ae22.tar.xz
immich-frame-2f03f39e24053377dce108e45fde13ccd1e0ae22.zip
window can now handle no selected albums
Diffstat (limited to 'lazycachelist.py')
-rw-r--r--lazycachelist.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lazycachelist.py b/lazycachelist.py
index 5243def..99212ab 100644
--- a/lazycachelist.py
+++ b/lazycachelist.py
@@ -150,6 +150,8 @@ class LazyCachingTextureList():
return self.asset_count
def __getitem__(self, index):
+ if not self.asset_count:
+ raise IndexError("Index out of bounds")
i = index % self.asset_count
if abs(index) > i:
raise IndexError("Index out of bounds")