mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-04-04 03:09:19 +08:00
fix scrape bug
This commit is contained in:
@@ -370,11 +370,7 @@ class MediaChain(ChainBase, metaclass=Singleton):
|
||||
tmp_file.write_bytes(_content)
|
||||
# 获取文件的父目录
|
||||
try:
|
||||
parent_item = self.storagechain.get_parent_item(_fileitem)
|
||||
if not parent_item:
|
||||
logger.warn(f"无法获取 {_fileitem.path} 的上级目录!")
|
||||
return
|
||||
item = self.storagechain.upload_file(fileitem=parent_item, path=tmp_file, new_name=_path.name)
|
||||
item = self.storagechain.upload_file(fileitem=_fileitem, path=tmp_file, new_name=_path.name)
|
||||
if item:
|
||||
logger.info(f"已保存文件:{item.path}")
|
||||
else:
|
||||
@@ -425,8 +421,6 @@ class MediaChain(ChainBase, metaclass=Singleton):
|
||||
logger.warn(f"{filepath.name} nfo文件生成失败!")
|
||||
return
|
||||
# 保存或上传nfo文件到上级目录
|
||||
if not parent:
|
||||
parent = self.storagechain.get_parent_item(fileitem)
|
||||
__save_file(_fileitem=parent, _path=nfo_path, _content=movie_nfo)
|
||||
else:
|
||||
# 电影目录
|
||||
|
||||
@@ -290,7 +290,7 @@ class TorrentHelper(metaclass=Singleton):
|
||||
if not file_path.suffix or file_path.suffix.lower() not in settings.RMT_MEDIAEXT:
|
||||
continue
|
||||
# 只使用文件名识别
|
||||
meta = MetaInfo(file_path.stem)
|
||||
meta = MetaInfo(file_path.name)
|
||||
if not meta.begin_episode:
|
||||
continue
|
||||
episodes = list(set(episodes).union(set(meta.episode_list)))
|
||||
|
||||
@@ -104,6 +104,7 @@ class TmdbScraper:
|
||||
url = f"https://{settings.TMDB_IMAGE_DOMAIN}/t/p/original{seasoninfo.get('poster_path')}"
|
||||
image_name = f"season{sea_seq}-poster{ext}"
|
||||
return image_name, url
|
||||
return "", ""
|
||||
|
||||
@staticmethod
|
||||
def __get_episode_detail(seasoninfo: dict, episode: int) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user