Update client/ayon_core/plugins/publish/extract_thumbnail.py

Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
Kayla Man 2025-04-29 20:40:50 +08:00 committed by GitHub
parent 4bb0e14106
commit c32cdba660
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -372,15 +372,10 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
Returns:
bool: whether the representation has the valid image content
"""
files = repre.get("files")
if not files:
return False
# Get first file's extension
if isinstance(files, (list, tuple)):
first_file = files[0]
else:
first_file = files
first_file = repre["files"]
if isinstance(first_file, (list, tuple)):
first_file = first_file[0]
ext = os.path.splitext(first_file)[1].lower()