mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Fix handling of unrecognized mimetypes in Synology DSM photos integration (#104848)
This commit is contained in:
parent
970751a635
commit
dc708b8a18
@ -153,8 +153,7 @@ class SynologyPhotosMediaSource(MediaSource):
|
||||
ret = []
|
||||
for album_item in album_items:
|
||||
mime_type, _ = mimetypes.guess_type(album_item.file_name)
|
||||
assert isinstance(mime_type, str)
|
||||
if mime_type.startswith("image/"):
|
||||
if isinstance(mime_type, str) and mime_type.startswith("image/"):
|
||||
# Force small small thumbnails
|
||||
album_item.thumbnail_size = "sm"
|
||||
ret.append(
|
||||
|
Loading…
x
Reference in New Issue
Block a user