add image/webp to the list of supported cover image types

This commit is contained in:
Artur Y
2024-12-07 13:27:45 +01:00
parent a20f1733f1
commit 181eff22ef

View File

@@ -368,7 +368,7 @@ class JellyfinClient:
# Step 2: Check the image content type (assume it's JPEG or PNG based on the content type from the response)
content_type = response.headers.get('Content-Type').lower()
if content_type not in ['image/jpeg', 'image/png', 'application/octet-stream']:
if content_type not in ['image/jpeg', 'image/png', 'image/webp', 'application/octet-stream']:
raise Exception(f"Unsupported image format: {content_type}")
# Todo:
if content_type == 'application/octet-stream':