mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 07:27:15 +08:00
Merge pull request #3254 from mackerel-12138/v2
This commit is contained in:
+4
-2
@@ -547,9 +547,11 @@ class MediaChain(ChainBase, metaclass=Singleton):
|
|||||||
continue
|
continue
|
||||||
# 下载图片
|
# 下载图片
|
||||||
content = __download_image(image_url)
|
content = __download_image(image_url)
|
||||||
# 保存图片文件到当前目录
|
# 保存图片文件到剧集目录
|
||||||
if content:
|
if content:
|
||||||
__save_file(_fileitem=fileitem, _path=image_path, _content=content)
|
if not parent:
|
||||||
|
parent = self.storagechain.get_parent_item(fileitem)
|
||||||
|
__save_file(_fileitem=parent, _path=image_path, _content=content)
|
||||||
# 判断当前目录是不是剧集根目录
|
# 判断当前目录是不是剧集根目录
|
||||||
if not season_meta.season:
|
if not season_meta.season:
|
||||||
# 是否已存在
|
# 是否已存在
|
||||||
|
|||||||
@@ -102,7 +102,11 @@ class TmdbScraper:
|
|||||||
ext = Path(seasoninfo.get('poster_path')).suffix
|
ext = Path(seasoninfo.get('poster_path')).suffix
|
||||||
# URL
|
# URL
|
||||||
url = f"https://{settings.TMDB_IMAGE_DOMAIN}/t/p/original{seasoninfo.get('poster_path')}"
|
url = f"https://{settings.TMDB_IMAGE_DOMAIN}/t/p/original{seasoninfo.get('poster_path')}"
|
||||||
image_name = f"season{sea_seq}-poster{ext}"
|
# S0海报格式不同
|
||||||
|
if season == 0:
|
||||||
|
image_name = f"season-specials-poster{ext}"
|
||||||
|
else:
|
||||||
|
image_name = f"season{sea_seq}-poster{ext}"
|
||||||
return image_name, url
|
return image_name, url
|
||||||
return "", ""
|
return "", ""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user