diff --git a/package.json b/package.json index cd7cf80..a12fc8a 100644 --- a/package.json +++ b/package.json @@ -337,8 +337,8 @@ }, "DownloadSiteTag": { "name": "下载任务分类与标签", - "description": "自动给下载任务分类与打站点标签", - "version": "1.1", + "description": "自动给下载任务分类与打站点标签、剧集名称标签", + "version": "1.2", "icon": "Youtube-dl_B.png", "author": "叮叮当", "level": 1 diff --git a/plugins/downloadsitetag/__init__.py b/plugins/downloadsitetag/__init__.py index 60b3d17..063aaa9 100644 --- a/plugins/downloadsitetag/__init__.py +++ b/plugins/downloadsitetag/__init__.py @@ -14,11 +14,11 @@ class DownloadSiteTag(_PluginBase): # 插件名称 plugin_name = "下载任务分类与标签" # 插件描述 - plugin_desc = "自动给下载任务分类与打站点标签" + plugin_desc = "自动给下载任务分类与打站点标签、剧集名称标签" # 插件图标 plugin_icon = "Youtube-dl_B.png" # 插件版本 - plugin_version = "1.1" + plugin_version = "1.2" # 插件作者 plugin_author = "叮叮当" # 作者主页 @@ -34,6 +34,7 @@ class DownloadSiteTag(_PluginBase): downloader_name = None downloader_example = None _enabled = False + _enabled_media_tag = False _enabled_tag = True _enabled_category = False _category_movie = None @@ -44,6 +45,7 @@ class DownloadSiteTag(_PluginBase): # 读取配置 if config: self._enabled = config.get("enabled") + self._enabled_media_tag = config.get("enabled_media_tag") self._enabled_tag = config.get("enabled_tag") self._enabled_category = config.get("enabled_category") self._category_movie = config.get("category_movie") or "电影" @@ -93,6 +95,9 @@ class DownloadSiteTag(_PluginBase): # 设置标签, 如果勾选开关的话 if self._enabled_tag: self.downloader_example.set_torrents_tag(ids=_hash, tags=[_torrent.site_name]) + # 设置媒体标题标签, 如果勾选开关的话 + if self._enabled_media_tag: + self.downloader_example.set_torrents_tag(ids=_hash, tags=[_media.title]) # 设置分类, 如果勾选开关的话