mirror of
https://github.com/FAUSheppy/homelab_gamevault
synced 2025-12-06 23:11:36 +01:00
fix: skip broken images for thumbnail
This commit is contained in:
@@ -206,9 +206,13 @@ def create_main_window_tile(software):
|
|||||||
'''Create the main window tile'''
|
'''Create the main window tile'''
|
||||||
|
|
||||||
if software.get_thumbnail():
|
if software.get_thumbnail():
|
||||||
|
try:
|
||||||
|
print("Loading thumbnail:", software.get_thumbnail())
|
||||||
img = PIL.Image.open(software.get_thumbnail())
|
img = PIL.Image.open(software.get_thumbnail())
|
||||||
img = imagetools.smart_resize(img, 200, 300)
|
img = imagetools.smart_resize(img, 200, 300)
|
||||||
#img = img.resize((200, 300))
|
except PIL.UnidentifiedImageError:
|
||||||
|
print("Failed to load thumbnail:", software.get_thumbnail())
|
||||||
|
img = PIL.Image.new('RGB', (200, 300))
|
||||||
else:
|
else:
|
||||||
img = PIL.Image.new('RGB', (200, 300))
|
img = PIL.Image.new('RGB', (200, 300))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user