feat 云盘strm生成插件说明

This commit is contained in:
thsrite
2023-11-22 11:21:28 +08:00
parent 99ef0a8e0d
commit 3ff8fbe6b3
3 changed files with 257 additions and 207 deletions

View File

@@ -144,7 +144,8 @@ class CloudStrm(_PluginBase):
# 异步开启云盘监控
logger.info(f"异步开启云盘监控 {source_dir} {mode}")
self._scheduler.add_job(func=self.start_monitor, trigger='date',
run_date=datetime.now(tz=pytz.timezone(settings.TZ)) + timedelta(seconds=int(self._relay)),
run_date=datetime.now(tz=pytz.timezone(settings.TZ)) + timedelta(
seconds=int(self._relay)),
name=f"云盘监控 {source_dir}",
kwargs={
"mode": mode,
@@ -427,210 +428,232 @@ class CloudStrm(_PluginBase):
拼装插件配置页面需要返回两块数据1、页面配置2、数据结构
"""
return [
{
'component': 'VForm',
'content': [
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12,
'md': 6
},
'content': [
{
'component': 'VSwitch',
'props': {
'model': 'enabled',
'label': '启用插件',
}
}
]
},
{
'component': 'VCol',
'props': {
'cols': 12,
'md': 6
},
'content': [
{
'component': 'VSwitch',
'props': {
'model': 'onlyonce',
'label': '立即运行一次',
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12
},
'content': [
{
'component': 'VTextField',
'props': {
'model': 'relay',
'label': '监控延迟',
'placeholder': '3'
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12
},
'content': [
{
'component': 'VTextarea',
'props': {
'model': 'monitor_confs',
'label': '监控目录',
'rows': 5,
'placeholder': '监控方式#监控目录#目的目录#媒体服务器内路径'
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12,
},
'content': [
{
'component': 'VAlert',
'props': {
'type': 'info',
'variant': 'tonal',
'text': '目录监控格式:'
'1.监控方式#监控目录#目的目录#媒体服务器内路径;'
'2.监控方式#监控目录#目的目录#cd2#cd2挂载本地跟路径#cd2服务地址'
'3.监控方式#监控目录#目的目录#alist#alist挂载本地跟路径#alist服务地址。'
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12,
},
'content': [
{
'component': 'VAlert',
'props': {
'type': 'info',
'variant': 'tonal',
'text': '媒体服务器内路径:'
'网盘映射本地路径挂载媒体服务器的路径。'
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12,
},
'content': [
{
'component': 'VAlert',
'props': {
'type': 'info',
'variant': 'tonal',
'text': '监控方式:'
'fast:性能模式,内部处理系统操作类型选择最优解'
'compatibility:兼容模式目录同步性能降低且NAS不能休眠但可以兼容挂载的远程共享目录如SMB'
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12,
},
'content': [
{
'component': 'VAlert',
'props': {
'type': 'info',
'variant': 'tonal',
'text': '立即运行一次:'
'全量运行一次。'
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12,
},
'content': [
{
'component': 'VAlert',
'props': {
'type': 'info',
'variant': 'tonal',
'text': '由于unraid开启云盘监控很慢所以采取异步方式开启磁盘监控'
'具体开启情况可稍等3-5分钟查看日志。'
}
}
]
}
]
},
]
}
], {
"enabled": False,
"relay": 3,
"onlyonce": False,
"monitor_confs": ""
}
{
'component': 'VForm',
'content': [
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12,
'md': 6
},
'content': [
{
'component': 'VSwitch',
'props': {
'model': 'enabled',
'label': '启用插件',
}
}
]
},
{
'component': 'VCol',
'props': {
'cols': 12,
'md': 6
},
'content': [
{
'component': 'VSwitch',
'props': {
'model': 'onlyonce',
'label': '立即运行一次',
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12
},
'content': [
{
'component': 'VTextField',
'props': {
'model': 'relay',
'label': '监控延迟',
'placeholder': '3'
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12
},
'content': [
{
'component': 'VTextarea',
'props': {
'model': 'monitor_confs',
'label': '监控目录',
'rows': 5,
'placeholder': '监控方式#监控目录#目的目录#媒体服务器内源文件路径'
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12,
},
'content': [
{
'component': 'VAlert',
'props': {
'type': 'info',
'variant': 'tonal',
'text': '目录监控格式:'
'1.监控方式#监控目录#目的目录#媒体服务器内源文件路径;'
'2.监控方式#监控目录#目的目录#cd2#cd2挂载本地跟路径#cd2服务地址'
'3.监控方式#监控目录#目的目录#alist#alist挂载本地跟路径#alist服务地址。'
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12,
},
'content': [
{
'component': 'VAlert',
'props': {
'type': 'info',
'variant': 'tonal',
'text': '媒体服务器内源文件路径:'
'源文件目录即云盘挂载媒体服务器的路径。'
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12,
},
'content': [
{
'component': 'VAlert',
'props': {
'type': 'info',
'variant': 'tonal',
'text': '监控方式:'
'fast:性能模式(快)'
'compatibility:兼容模式(稳,推荐)'
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12,
},
'content': [
{
'component': 'VAlert',
'props': {
'type': 'info',
'variant': 'tonal',
'text': '立即运行一次:'
'全量运行一次。'
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12,
},
'content': [
{
'component': 'VAlert',
'props': {
'type': 'info',
'variant': 'tonal',
'text': '由于unraid开启云盘监控很慢所以采取异步方式开启磁盘监控'
'具体开启情况可稍等3-5分钟查看日志。'
}
}
]
}
]
},
{
'component': 'VRow',
'content': [
{
'component': 'VCol',
'props': {
'cols': 12,
},
'content': [
{
'component': 'VAlert',
'props': {
'type': 'info',
'variant': 'tonal',
'text': '配置说明:'
'https://raw.githubusercontent.com/thsrite/MoviePilot-Plugins/main/plugins_record/CloudStrm.md'
}
}
]
}
]
}
]
}
], {
"enabled": False,
"relay": 3,
"onlyonce": False,
"monitor_confs": ""
}
def get_page(self) -> List[dict]:
pass

View File

@@ -10,4 +10,31 @@
- 1.1 支持alist链接模式
- 1.0 监控文件创建生成strm文件
### 使用说明
### 使用说明
目录监控格式:
- 1.监控方式#监控目录#目的目录#媒体服务器内源文件路径
- 2.监控方式#监控目录#目的目录#cd2#cd2挂载本地跟路径#cd2服务地址
- 3.监控方式#监控目录#目的目录#alist#alist挂载本地跟路径#alist服务地址
监控方式:
- fast:性能模式,内部处理系统操作类型选择最优解
- compatibility:兼容模式目录同步性能降低且NAS不能休眠但可以兼容挂载的远程共享目录如SMB (建议使用)
路径:
- 监控目录源文件目录即云盘挂载到MoviePilot中的路径
- 目的路径MoviePilot中strm生成路径
- 媒体服务器内源文件路径:源文件目录即云盘挂载到媒体服务器的路径
示例:
- MoviePilot上云盘源文件路径 /mount/cloud/aliyun/emby`/tvshow/爸爸去哪儿/Season 5/14.特别版.mp4`
- MoviePilot上strm生成路径 /mnt/link/aliyun`/tvshow/爸爸去哪儿/Season 5/14.特别版.strm`
- 媒体服务器内源文件路径 /mount/cloud/aliyun/emby`/tvshow/爸爸去哪儿/Season 5/14.特别版.mp4`
- 监控配置为compatibility#/mount/cloud/aliyun/emby#/mnt/link/aliyun#/mount/cloud/aliyun/emby

View File

@@ -7,7 +7,7 @@
### 使用说明
#### 本地模式
- MoviePilot上strm视频路径 /mnt/link/aliyun`/tvshow/爸爸去哪儿/Season 5/14.特别版.strm`
- MoviePilot上strm视频路径 /mnt/link/aliyun`/tvshow/爸爸去哪儿/Season 5/14.特别版.strm`
- 云盘源文件挂载本地后 挂载`进媒体服务器的路径`,与上方对应 /mount/cloud/aliyun/emby`/tvshow/爸爸去哪儿/Season 5/14.特别版.mp4`
- 转换配置为:`/mnt/link/aliyun#/mount/cloud/aliyun/emby`