mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-03-27 10:05:57 +00:00
fix Emby弹幕下载修复获取弹幕源
This commit is contained in:
@@ -62,5 +62,5 @@ MoviePilot三方插件市场:https://github.com/thsrite/MoviePilot-Plugins/
|
||||
56. 影视将映订阅 v1.1 `监控未上线影视作品,自动添加订阅。`
|
||||
57. Emby视频类型检查 v1.0 `定期检查Emby媒体库中是否包含指定的视频类型,发送通知。`
|
||||
58. Emby有声书整理 v1.3 `还在为Emby有声书整理烦恼吗?入库存在很多单集?`
|
||||
59. Emby弹幕下载 v1.4 `通知Emby Danmu插件下载弹幕。`
|
||||
59. Emby弹幕下载 v1.5 `通知Emby Danmu插件下载弹幕。`
|
||||
60. Emby剧集演员同步 v1.5 `同步剧演员信息到集演员信息。`
|
||||
@@ -132,11 +132,12 @@
|
||||
"name": "Emby弹幕下载",
|
||||
"description": "通知Emby Danmu插件下载弹幕。",
|
||||
"labels": "Emby,媒体库",
|
||||
"version": "1.4",
|
||||
"version": "1.5",
|
||||
"icon": "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/danmu.png",
|
||||
"author": "thsrite",
|
||||
"level": 1,
|
||||
"history": {
|
||||
"v1.5": "修复获取弹幕源",
|
||||
"v1.4": "修复自定义参数",
|
||||
"v1.3": "适配v2多媒体服务器",
|
||||
"v1.2": "检查本地弹幕文件是否已存在,避免重复下载。",
|
||||
|
||||
@@ -20,7 +20,7 @@ class EmbyDanmu(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/icons/danmu.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.4"
|
||||
plugin_version = "1.5"
|
||||
# 插件作者
|
||||
plugin_author = "thsrite"
|
||||
# 作者主页
|
||||
@@ -52,8 +52,6 @@ class EmbyDanmu(_PluginBase):
|
||||
self._enabled = config.get("enabled")
|
||||
self._mediaservers = config.get("mediaservers") or []
|
||||
|
||||
self._danmu_source = self.__get_danmu_source()
|
||||
|
||||
@eventmanager.register(EventType.PluginAction)
|
||||
def danmu(self, event: Event = None):
|
||||
if not self._enabled:
|
||||
@@ -76,14 +74,6 @@ class EmbyDanmu(_PluginBase):
|
||||
userid=event.event_data.get("user"))
|
||||
return
|
||||
|
||||
# 检查插件是否正确配置
|
||||
if not self._danmu_source:
|
||||
logger.error(f"未配置弹幕源")
|
||||
self.post_message(channel=event.event_data.get("channel"),
|
||||
title=f"Emby未正确配置弹幕源",
|
||||
userid=event.event_data.get("user"))
|
||||
return
|
||||
|
||||
emby_servers = self.mediaserver_helper.get_services(name_filters=self._mediaservers, type_filter="emby")
|
||||
if not emby_servers:
|
||||
logger.error("未配置Emby媒体服务器")
|
||||
@@ -99,6 +89,16 @@ class EmbyDanmu(_PluginBase):
|
||||
if not self._EMBY_HOST.startswith("http"):
|
||||
self._EMBY_HOST = "http://" + self._EMBY_HOST
|
||||
|
||||
self._danmu_source = self.__get_danmu_source()
|
||||
|
||||
# 检查插件是否正确配置
|
||||
if not self._danmu_source:
|
||||
logger.error(f"未配置弹幕源")
|
||||
self.post_message(channel=event.event_data.get("channel"),
|
||||
title=f"Emby未正确配置弹幕源",
|
||||
userid=event.event_data.get("user"))
|
||||
return
|
||||
|
||||
library_name = args_list[0]
|
||||
library_item_name = args_list[1]
|
||||
library_item_season = None
|
||||
|
||||
Reference in New Issue
Block a user