diff --git a/plugins.v2/filesoftlink/__init__.py b/plugins.v2/filesoftlink/__init__.py index d674989..c0534f3 100644 --- a/plugins.v2/filesoftlink/__init__.py +++ b/plugins.v2/filesoftlink/__init__.py @@ -320,6 +320,9 @@ class FileSoftLink(_PluginBase): # 指定路径软连接 if not mon_path: logger.error(f"未找到 {category} 对应的监控目录") + self.post_message(channel=event.event_data.get("channel"), + title=f"未找到 {category} 对应的监控目录", + userid=event.event_data.get("user")) return self.__handle_limit(path=category, mon_path=mon_path, limit=limit, event=event) @@ -335,9 +338,14 @@ class FileSoftLink(_PluginBase): self.__handle_limit(path=parent_path, mon_path=mon_path, limit=limit, event=event) else: logger.info(f"获取到 {category} {args} 对应的监控目录 {parent_path}") + target_path = os.path.join(str(parent_path), args) + logger.info(f"开始处理 {target_path}") target_paths = self.__find_related_paths(os.path.join(str(parent_path), args)) if not target_paths: logger.error(f"未查找到 {category} {args} 对应的具体目录") + self.post_message(channel=event.event_data.get("channel"), + title=f"未查找到 {category} {args} 对应的具体目录", + userid=event.event_data.get("user")) return for target_path in target_paths: logger.info(f"开始定向处理文件夹 ...{target_path}") diff --git a/plugins/cloudsyncdel/__init__.py b/plugins/cloudsyncdel/__init__.py index 6a58da1..59880c2 100644 --- a/plugins/cloudsyncdel/__init__.py +++ b/plugins/cloudsyncdel/__init__.py @@ -176,7 +176,7 @@ class CloudSyncDel(_PluginBase): image = 'https://emby.media/notificationicon.png' media_type = MediaType.MOVIE if media_type in ["Movie", "MOV"] else MediaType.TV - if cloud_file_flag and self._notify: + if cloud_file_flag: if self._url: if not media_path.suffix or media_path.suffix in settings.RMT_MEDIAEXT: RequestUtils(content_type="application/json").post(url=self._url, json={ @@ -184,37 +184,38 @@ class CloudSyncDel(_PluginBase): "type": "del" }) - backrop_image = self.chain.obtain_specific_image( - mediaid=tmdb_id, - mtype=media_type, - image_type=MediaImageType.Backdrop, - season=season_num, - episode=episode_num - ) or image + if self._notify: + backrop_image = self.chain.obtain_specific_image( + mediaid=tmdb_id, + mtype=media_type, + image_type=MediaImageType.Backdrop, + season=season_num, + episode=episode_num + ) or image - # 类型 - if media_type == MediaType.MOVIE: - msg = f'电影 {media_name} {tmdb_id}' - # 删除电视剧 - elif media_type == MediaType.TV and not season_num and not episode_num: - msg = f'剧集 {media_name} {tmdb_id}' - # 删除季 S02 - elif media_type == MediaType.TV and season_num and (not episode_num or not str(episode_num).isdigit()): - msg = f'剧集 {media_name} S{season_num} {tmdb_id}' - # 删除剧集S02E02 - elif media_type == MediaType.TV and season_num and episode_num and str(episode_num).isdigit(): - msg = f'剧集 {media_name} S{season_num}E{episode_num} {tmdb_id}' - else: - msg = media_name + # 类型 + if media_type == MediaType.MOVIE: + msg = f'电影 {media_name} {tmdb_id}' + # 删除电视剧 + elif media_type == MediaType.TV and not season_num and not episode_num: + msg = f'剧集 {media_name} {tmdb_id}' + # 删除季 S02 + elif media_type == MediaType.TV and season_num and (not episode_num or not str(episode_num).isdigit()): + msg = f'剧集 {media_name} S{season_num} {tmdb_id}' + # 删除剧集S02E02 + elif media_type == MediaType.TV and season_num and episode_num and str(episode_num).isdigit(): + msg = f'剧集 {media_name} S{season_num}E{episode_num} {tmdb_id}' + else: + msg = media_name - # 发送通知 - self.post_message( - mtype=NotificationType.Plugin, - title="云盘同步删除任务完成", - image=backrop_image, - text=f"{msg}\n" - f"时间 {time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))}" - ) + # 发送通知 + self.post_message( + mtype=NotificationType.Plugin, + title="云盘同步删除任务完成", + image=backrop_image, + text=f"{msg}\n" + f"时间 {time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))}" + ) # 读取历史记录 history = self.get_data('history') or []