diff --git a/plugins/cloudsyncdel/__init__.py b/plugins/cloudsyncdel/__init__.py index 0a1c71f..ba360bc 100644 --- a/plugins/cloudsyncdel/__init__.py +++ b/plugins/cloudsyncdel/__init__.py @@ -4,7 +4,7 @@ import time from pathlib import Path from app import schemas -from app.core.config import settings +from app.core.config import settings, Settings from app.core.event import eventmanager, Event from app.log import logger from app.plugins import _PluginBase @@ -170,10 +170,11 @@ class CloudSyncDel(_PluginBase): if cloud_file_flag and self._notify: if self._url: - RequestUtils().post(url=self._url, json={ - "path": str(media_path), - "type": "del" - }) + if not media_path.suffix or media_path.suffix in Settings.RMT_MEDIAEXT: + RequestUtils().post(url=self._url, json={ + "path": str(media_path), + "type": "del" + }) backrop_image = self.chain.obtain_specific_image( mediaid=tmdb_id, diff --git a/plugins/filesoftlink/__init__.py b/plugins/filesoftlink/__init__.py index 6d9ad42..cec0f99 100644 --- a/plugins/filesoftlink/__init__.py +++ b/plugins/filesoftlink/__init__.py @@ -15,7 +15,7 @@ from watchdog.observers import Observer from watchdog.observers.polling import PollingObserver from app import schemas -from app.core.config import settings +from app.core.config import settings, Settings from app.core.event import eventmanager, Event from app.log import logger from app.plugins import _PluginBase @@ -560,10 +560,11 @@ class FileSoftLink(_PluginBase): retcode, retmsg = SystemUtils.softlink(file_path, Path(target_file)) logger.info(f"创建媒体文件软连接 {str(file_path)} 到 {target_file} {retcode} {retmsg}") if self._url: - RequestUtils().post(url=self._url, json={ - "path": str(file_path), - "type": "add" - }) + if file_path.suffix in Settings.RMT_MEDIAEXT: + RequestUtils().post(url=self._url, json={ + "path": str(file_path), + "type": "add" + }) else: if self._copy_files: # 其他nfo、jpg等复制文件