From 2be2b2908362fd093b8d4a25a050b80c347da047 Mon Sep 17 00:00:00 2001 From: thsrite Date: Sat, 10 Aug 2024 19:55:35 +0800 Subject: [PATCH] fix --- plugins/cloudsyncdel/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/cloudsyncdel/__init__.py b/plugins/cloudsyncdel/__init__.py index ed67e71..c2e176a 100644 --- a/plugins/cloudsyncdel/__init__.py +++ b/plugins/cloudsyncdel/__init__.py @@ -100,7 +100,8 @@ class CloudSyncDel(_PluginBase): local_path = self.__get_path(self._local_paths, media_path) logger.info(f"获取到本地文件路径 {local_path}") - if Path(local_path).exists() and (Path(local_path).is_dir() or not Path(local_path).is_symlink()): + if Path(local_path).exists() and ( + Path(local_path).is_dir() or (Path(local_path).is_file() and not Path(local_path).is_symlink())): Path(local_path).unlink() logger.info(f"获取到本地路径 {local_path}, 通知媒体库同步删除插件删除") eventItem = schemas.WebhookEventInfo(event="media_del", channel="emby")