fix bug
This commit is contained in:
parent
5dd36e95e0
commit
da80ad33d9
@ -1,4 +1,5 @@
|
|||||||
import time
|
import time
|
||||||
|
import traceback
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Union
|
from typing import Union
|
||||||
from xml.dom import minidom
|
from xml.dom import minidom
|
||||||
@ -135,14 +136,15 @@ 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.jpg").with_suffix(
|
if episode_image:
|
||||||
Path(episode_image).suffix)
|
image_path = file_path.with_name(file_path.stem + "-thumb.jpg").with_suffix(
|
||||||
if episode_image and (self._force_img or not image_path.exists()):
|
Path(episode_image).suffix)
|
||||||
self.__save_image(
|
if self._force_img or not image_path.exists():
|
||||||
f"https://{settings.TMDB_IMAGE_DOMAIN}/t/p/original{episode_image}",
|
self.__save_image(
|
||||||
image_path)
|
f"https://{settings.TMDB_IMAGE_DOMAIN}/t/p/original{episode_image}",
|
||||||
|
image_path)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"{file_path} 刮削失败:{str(e)}")
|
logger.error(f"{file_path} 刮削失败:{str(e)} - {traceback.format_exc()}")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __gen_common_nfo(mediainfo: MediaInfo, doc, root):
|
def __gen_common_nfo(mediainfo: MediaInfo, doc, root):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user