diff --git a/modules/apihelper/client/components/hyperion.py b/modules/apihelper/client/components/hyperion.py index f522b99..ce04215 100644 --- a/modules/apihelper/client/components/hyperion.py +++ b/modules/apihelper/client/components/hyperion.py @@ -97,8 +97,9 @@ class HyperionBase: @staticmethod async def download_image(client: "HyperionRequest", art_id: int, url: str, page: int = 0) -> List[ArtworkImage]: filename = os.path.basename(url) - _, file_extension = os.path.splitext(filename) - is_image = bool(file_extension in ".jpg" or file_extension in ".png") + _, _file_extension = os.path.splitext(filename) + file_extension = _file_extension.lower() + is_image = file_extension in ".jpg" or file_extension in ".jpeg" or file_extension in ".png" response = await client.get( url, params=Hyperion.get_images_params(resize=2000) if is_image else None, de_json=False ) diff --git a/modules/apihelper/models/genshin/hyperion.py b/modules/apihelper/models/genshin/hyperion.py index 34365a2..508f01e 100644 --- a/modules/apihelper/models/genshin/hyperion.py +++ b/modules/apihelper/models/genshin/hyperion.py @@ -107,7 +107,7 @@ class PostInfo(BaseModel): image_keys = {"cover_list", "image_list"} for key in image_keys: image_list.extend(_data_post.get(key, [])) - image_urls = [image["url"] for image in image_list] + image_urls = list({image["url"] for image in image_list}) key1, key2 = ("video", "resolution") if hoyolab else ("vod_list", "resolutions") vod_list = _data_post.get(key1, []) if not isinstance(vod_list, list):