fix 标题不一致时防误删

This commit is contained in:
thsrite 2023-09-06 15:07:06 +08:00
parent cfeaa2674d
commit 697d5a815b

View File

@ -557,6 +557,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
@ -752,6 +757,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)