This commit is contained in:
thsrite
2024-07-31 21:14:05 +08:00
parent 8a8ddb19a2
commit 543f170c68
2 changed files with 12 additions and 10 deletions

View File

@@ -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,

View File

@@ -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等复制文件