From e97747ddbbe933a04f430e9d20c70db60d6dfdc2 Mon Sep 17 00:00:00 2001 From: thsrite Date: Sat, 9 Nov 2024 17:26:23 +0800 Subject: [PATCH] fix #106 --- package.v2.json | 4 ++-- plugins.v2/libraryduplicatecheck/__init__.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package.v2.json b/package.v2.json index d6d61b5..a36b484 100644 --- a/package.v2.json +++ b/package.v2.json @@ -176,12 +176,12 @@ "name": "Emby媒体库重复媒体检测", "description": "媒体库重复媒体检查,可选保留规则保留其一。", "labels": "Emby,云盘,媒体库", - "version": "2.0", + "version": "2.0.1", "icon": "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/libraryduplicate.png", "author": "thsrite", "level": 2, "history": { - "v2.0": "适配v2多媒体服务器", + "v2.0.1": "适配v2多媒体服务器", "v1.9": "修复删除软连接", "v1.8": "仅检查模式下,预览操作不会删除任何文件。", "v1.7": "修复特殊场景下删除问题", diff --git a/plugins.v2/libraryduplicatecheck/__init__.py b/plugins.v2/libraryduplicatecheck/__init__.py index a4f64bd..8b28e4e 100644 --- a/plugins.v2/libraryduplicatecheck/__init__.py +++ b/plugins.v2/libraryduplicatecheck/__init__.py @@ -8,6 +8,7 @@ from pathlib import Path import pytz from app.core.config import settings +from app.helper.mediaserver import MediaServerHelper from app.modules.emby import Emby from app.plugins import _PluginBase from typing import Any, List, Dict, Tuple, Optional @@ -30,7 +31,7 @@ class LibraryDuplicateCheck(_PluginBase): # 插件图标 plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/libraryduplicate.png" # 插件版本 - plugin_version = "2.0" + plugin_version = "2.0.1" # 插件作者 plugin_author = "thsrite" # 作者主页 @@ -64,6 +65,7 @@ class LibraryDuplicateCheck(_PluginBase): _scheduler: Optional[BackgroundScheduler] = None def init_plugin(self, config: dict = None): + self.mediaserver_helper = MediaServerHelper() if config: self._enabled = config.get("enabled") self._notify = config.get("notify")