From 7130194d5fc30d3663679054fa3e9e77a69fed3c Mon Sep 17 00:00:00 2001 From: thsrite Date: Thu, 26 Oct 2023 14:55:08 +0800 Subject: [PATCH] fix --- app/plugins/mediasyncdel/__init__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/plugins/mediasyncdel/__init__.py b/app/plugins/mediasyncdel/__init__.py index 58ea7415..218bc0ca 100644 --- a/app/plugins/mediasyncdel/__init__.py +++ b/app/plugins/mediasyncdel/__init__.py @@ -578,13 +578,6 @@ class MediaSyncDel(_PluginBase): """ 执行删除逻辑 """ - if not media_type: - logger.error(f"{media_name} 同步删除失败,未获取到媒体类型,请检查媒体是否刮削") - return - if not tmdb_id or not str(tmdb_id).isdigit(): - logger.error(f"{media_name} 同步删除失败,未获取到TMDB ID,请检查媒体是否刮削") - return - if self._exclude_path and media_path and any( os.path.abspath(media_path).startswith(os.path.abspath(path)) for path in self._exclude_path.split(",")): @@ -601,6 +594,13 @@ class MediaSyncDel(_PluginBase): }) return + if not media_type: + logger.error(f"{media_name} 同步删除失败,未获取到媒体类型,请检查媒体是否刮削") + return + if not tmdb_id or not str(tmdb_id).isdigit(): + logger.error(f"{media_name} 同步删除失败,未获取到TMDB ID,请检查媒体是否刮削") + return + # 查询转移记录 msg, transfer_history = self.__get_transfer_his(media_type=media_type, media_name=media_name,