This commit is contained in:
Kamil
2024-12-09 09:52:31 +00:00

View File

@@ -367,8 +367,8 @@ class JellyfinClient:
raise Exception(f"Failed to download image from Spotify: {response.content}") raise Exception(f"Failed to download image from Spotify: {response.content}")
# Step 2: Check the image content type (assume it's JPEG or PNG based on the content type from the response) # 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') 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}") raise Exception(f"Unsupported image format: {content_type}")
# Todo: # Todo:
if content_type == 'application/octet-stream': if content_type == 'application/octet-stream':