fix 获取图片
This commit is contained in:
parent
b4432b923a
commit
751bb76d42
@ -54,7 +54,6 @@ class MediaSyncDel(_PluginBase):
|
|||||||
_notify = False
|
_notify = False
|
||||||
_del_source = False
|
_del_source = False
|
||||||
_exclude_path = None
|
_exclude_path = None
|
||||||
_episode = None
|
|
||||||
_transferhis = None
|
_transferhis = None
|
||||||
|
|
||||||
def init_plugin(self, config: dict = None):
|
def init_plugin(self, config: dict = None):
|
||||||
@ -113,150 +112,150 @@ class MediaSyncDel(_PluginBase):
|
|||||||
拼装插件配置页面,需要返回两块数据:1、页面配置;2、数据结构
|
拼装插件配置页面,需要返回两块数据:1、页面配置;2、数据结构
|
||||||
"""
|
"""
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
'component': 'VForm',
|
'component': 'VForm',
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VRow',
|
'component': 'VRow',
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VCol',
|
'component': 'VCol',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
'cols': 12,
|
||||||
'md': 4
|
'md': 4
|
||||||
},
|
},
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VSwitch',
|
'component': 'VSwitch',
|
||||||
'props': {
|
'props': {
|
||||||
'model': 'enabled',
|
'model': 'enabled',
|
||||||
'label': '启用插件',
|
'label': '启用插件',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'component': 'VCol',
|
'component': 'VCol',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
'cols': 12,
|
||||||
'md': 4
|
'md': 4
|
||||||
},
|
},
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VSwitch',
|
'component': 'VSwitch',
|
||||||
'props': {
|
'props': {
|
||||||
'model': 'notify',
|
'model': 'notify',
|
||||||
'label': '发送通知',
|
'label': '发送通知',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'component': 'VCol',
|
'component': 'VCol',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
'cols': 12,
|
||||||
'md': 4
|
'md': 4
|
||||||
},
|
},
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VSwitch',
|
'component': 'VSwitch',
|
||||||
'props': {
|
'props': {
|
||||||
'model': 'del_source',
|
'model': 'del_source',
|
||||||
'label': '删除源文件',
|
'label': '删除源文件',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'component': 'VRow',
|
'component': 'VRow',
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VCol',
|
'component': 'VCol',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
'cols': 12,
|
||||||
'md': 4
|
'md': 4
|
||||||
},
|
},
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VSelect',
|
'component': 'VSelect',
|
||||||
'props': {
|
'props': {
|
||||||
'model': 'sync_type',
|
'model': 'sync_type',
|
||||||
'label': '同步方式',
|
'label': '同步方式',
|
||||||
'items': [
|
'items': [
|
||||||
{'title': '日志', 'value': 'log'},
|
{'title': '日志', 'value': 'log'},
|
||||||
{'title': 'Scripter X', 'value': 'plugin'}
|
{'title': 'Scripter X', 'value': 'plugin'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'component': 'VCol',
|
'component': 'VCol',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
'cols': 12,
|
||||||
'md': 4
|
'md': 4
|
||||||
},
|
},
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VTextField',
|
'component': 'VTextField',
|
||||||
'props': {
|
'props': {
|
||||||
'model': 'cron',
|
'model': 'cron',
|
||||||
'label': '执行周期',
|
'label': '执行周期',
|
||||||
'placeholder': '5位cron表达式,留空自动'
|
'placeholder': '5位cron表达式,留空自动'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'component': 'VCol',
|
'component': 'VCol',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
'cols': 12,
|
||||||
'md': 4
|
'md': 4
|
||||||
},
|
},
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VTextField',
|
'component': 'VTextField',
|
||||||
'props': {
|
'props': {
|
||||||
'model': 'exclude_path',
|
'model': 'exclude_path',
|
||||||
'label': '排除路径'
|
'label': '排除路径'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'component': 'VRow',
|
'component': 'VRow',
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VCol',
|
'component': 'VCol',
|
||||||
'props': {
|
'props': {
|
||||||
'cols': 12,
|
'cols': 12,
|
||||||
},
|
},
|
||||||
'content': [
|
'content': [
|
||||||
{
|
{
|
||||||
'component': 'VAlert',
|
'component': 'VAlert',
|
||||||
'props': {
|
'props': {
|
||||||
'text': '同步方式分为日志同步和Scripter X。日志同步需要配置执行周期,默认30分钟执行一次。'
|
'text': '同步方式分为日志同步和Scripter X。日志同步需要配置执行周期,默认30分钟执行一次。'
|
||||||
'Scripter X方式需要emby安装并配置Scripter X插件,无需配置执行周期。'
|
'Scripter X方式需要emby安装并配置Scripter X插件,无需配置执行周期。'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
], {
|
], {
|
||||||
"enabled": False,
|
"enabled": False,
|
||||||
"notify": True,
|
"notify": True,
|
||||||
"del_source": False,
|
"del_source": False,
|
||||||
"sync_type": "log",
|
"sync_type": "log",
|
||||||
"cron": "*/30 * * * *",
|
"cron": "*/30 * * * *",
|
||||||
"exclude_path": "",
|
"exclude_path": "",
|
||||||
}
|
}
|
||||||
|
|
||||||
def get_page(self) -> List[dict]:
|
def get_page(self) -> List[dict]:
|
||||||
"""
|
"""
|
||||||
@ -511,10 +510,9 @@ class MediaSyncDel(_PluginBase):
|
|||||||
if self._notify:
|
if self._notify:
|
||||||
if media_type == "Episode":
|
if media_type == "Episode":
|
||||||
# 根据tmdbid获取图片
|
# 根据tmdbid获取图片
|
||||||
image = self._episode().images(tv_id=tmdb_id,
|
image = self.episode.images(tv_id=tmdb_id,
|
||||||
season_id=season_num,
|
season_num=season_num,
|
||||||
episode_id=episode_num,
|
episode_num=episode_num)
|
||||||
orginal=True)
|
|
||||||
# 发送通知
|
# 发送通知
|
||||||
self.post_message(
|
self.post_message(
|
||||||
mtype=NotificationType.MediaServer,
|
mtype=NotificationType.MediaServer,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user