Merge pull request #575 from thsrite/main

This commit is contained in:
jxxghp
2023-09-13 13:26:09 +08:00
committed by GitHub
2 changed files with 15 additions and 5 deletions

View File

@ -572,6 +572,11 @@ class MediaSyncDel(_PluginBase):
stop_cnt = 0
error_cnt = 0
for transferhis in transfer_history:
title = transferhis.title
if title not in media_name:
logger.warn(
f"当前转移记录 {transferhis.id} {title} {transferhis.tmdbid} 与删除媒体{media_name}不符,防误删,暂不自动删除")
continue
image = transferhis.image
year = transferhis.year
@ -807,6 +812,11 @@ class MediaSyncDel(_PluginBase):
stop_cnt = 0
error_cnt = 0
for transferhis in transfer_history:
title = transferhis.title
if title not in media_name:
logger.warn(
f"当前转移记录 {transferhis.id} {title} {transferhis.tmdbid} 与删除媒体{media_name}不符,防误删,暂不自动删除")
continue
image = transferhis.image
# 0、删除转移记录
self._transferhis.delete(transferhis.id)