diff --git a/plugins/shortplaymonitor/__init__.py b/plugins/shortplaymonitor/__init__.py index b9d80b0..3138409 100644 --- a/plugins/shortplaymonitor/__init__.py +++ b/plugins/shortplaymonitor/__init__.py @@ -279,7 +279,15 @@ class ShortPlayMonitor(_PluginBase): if not (target_path.parent / "poster.jpg").exists(): thumb_path = self.gen_file_thumb(file_path=target_path, cover_conf=cover_conf) - SystemUtils.move(thumb_path, target_path.parent / "poster.jpg") + if thumb_path and Path(thumb_path).exists(): + SystemUtils.move(thumb_path, target_path.parent / "poster.jpg") + else: + # 检查是否有缩略图 + thumb_files = SystemUtils.list_files(directory=target_path.parent, + extensions=[".jpg"]) + if thumb_files: + for thumb in thumb_files: + SystemUtils.move(thumb, target_path.parent / "poster.jpg") else: logger.error(f"文件 {event_path} 硬链接失败,错误码:{retcode}")