fix 集图片命名

This commit is contained in:
jxxghp 2023-12-06 13:08:15 +08:00
parent ab138560c1
commit a317c35eab

View File

@ -120,10 +120,11 @@ class TmdbScraper:
file_path=file_path) file_path=file_path)
# 集的图片 # 集的图片
episode_image = episodeinfo.get("still_path") episode_image = episodeinfo.get("still_path")
image_path = file_path.with_name(file_path.stem + "-thumb").with_suffix(Path(episode_image).suffix)
if episode_image: if episode_image:
self.__save_image( self.__save_image(
f"https://{settings.TMDB_IMAGE_DOMAIN}/t/p/original{episode_image}", f"https://{settings.TMDB_IMAGE_DOMAIN}/t/p/original{episode_image}",
file_path.with_suffix(Path(episode_image).suffix)) image_path)
except Exception as e: except Exception as e:
logger.error(f"{file_path} 刮削失败:{str(e)}") logger.error(f"{file_path} 刮削失败:{str(e)}")