mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
fix: avoid duplicate image fetch in transfer
Keep transfer recognition results ready for scraping without fetching images twice on the same path. Also ensure redo-by-path transfer recognition still populates image data before metadata scraping.
This commit is contained in:
@@ -1269,6 +1269,7 @@ class TransferChain(ChainBase, ConfigReloadMixin, metaclass=Singleton):
|
|||||||
transferhis = TransferHistoryOper()
|
transferhis = TransferHistoryOper()
|
||||||
mediainfo = task.mediainfo
|
mediainfo = task.mediainfo
|
||||||
mediainfo_changed = False
|
mediainfo_changed = False
|
||||||
|
need_obtain_images = False
|
||||||
if not mediainfo:
|
if not mediainfo:
|
||||||
download_history = task.download_history
|
download_history = task.download_history
|
||||||
# 下载用户
|
# 下载用户
|
||||||
@@ -1283,6 +1284,7 @@ class TransferChain(ChainBase, ConfigReloadMixin, metaclass=Singleton):
|
|||||||
doubanid=download_history.doubanid,
|
doubanid=download_history.doubanid,
|
||||||
episode_group=download_history.episode_group,
|
episode_group=download_history.episode_group,
|
||||||
)
|
)
|
||||||
|
need_obtain_images = True
|
||||||
if mediainfo:
|
if mediainfo:
|
||||||
# 更新自定义媒体类别
|
# 更新自定义媒体类别
|
||||||
if download_history.media_category:
|
if download_history.media_category:
|
||||||
@@ -1294,8 +1296,8 @@ class TransferChain(ChainBase, ConfigReloadMixin, metaclass=Singleton):
|
|||||||
obtain_images=True,
|
obtain_images=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
# 补充图片,确保整理后直接进入刮削的媒体信息已带图片地址。
|
# 按名称识别时已在识别链路补图,这里只补齐显式ID识别的场景。
|
||||||
if mediainfo:
|
if mediainfo and need_obtain_images:
|
||||||
self.obtain_images(mediainfo=mediainfo)
|
self.obtain_images(mediainfo=mediainfo)
|
||||||
|
|
||||||
if not mediainfo:
|
if not mediainfo:
|
||||||
@@ -2275,7 +2277,7 @@ class TransferChain(ChainBase, ConfigReloadMixin, metaclass=Singleton):
|
|||||||
recognize_context = MediaChain().recognize_by_path(
|
recognize_context = MediaChain().recognize_by_path(
|
||||||
str(src_path),
|
str(src_path),
|
||||||
episode_group=history.episode_group,
|
episode_group=history.episode_group,
|
||||||
obtain_images=False,
|
obtain_images=True,
|
||||||
)
|
)
|
||||||
mediainfo = recognize_context.media_info if recognize_context else None
|
mediainfo = recognize_context.media_info if recognize_context else None
|
||||||
if not mediainfo:
|
if not mediainfo:
|
||||||
|
|||||||
Reference in New Issue
Block a user