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