Fix handling of unrecognized mimetypes in Synology DSM photos integration (#104848)
This commit is contained in:
parent
d67d2d9566
commit
074bcc8adc
1 changed files with 1 additions and 2 deletions
|
@ -153,8 +153,7 @@ class SynologyPhotosMediaSource(MediaSource):
|
||||||
ret = []
|
ret = []
|
||||||
for album_item in album_items:
|
for album_item in album_items:
|
||||||
mime_type, _ = mimetypes.guess_type(album_item.file_name)
|
mime_type, _ = mimetypes.guess_type(album_item.file_name)
|
||||||
assert isinstance(mime_type, str)
|
if isinstance(mime_type, str) and mime_type.startswith("image/"):
|
||||||
if mime_type.startswith("image/"):
|
|
||||||
# Force small small thumbnails
|
# Force small small thumbnails
|
||||||
album_item.thumbnail_size = "sm"
|
album_item.thumbnail_size = "sm"
|
||||||
ret.append(
|
ret.append(
|
||||||
|
|
Loading…
Add table
Reference in a new issue