mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-21 15:09:36 +00:00
Merge branch 'jxxghp:main' into feature_dev
This commit is contained in:
@@ -186,7 +186,7 @@
|
||||
"CrossSeed": {
|
||||
"name": "青蛙辅种助手",
|
||||
"description": "参考ReseedPuppy和IYUU辅种插件实现自动辅种,支持站点:青蛙、AGSVPT、麒麟、UBits、聆音、憨憨等。",
|
||||
"version": "1.9",
|
||||
"version": "2.0",
|
||||
"icon": "qingwa.png",
|
||||
"author": "233@qingwa",
|
||||
"level": 2
|
||||
@@ -194,7 +194,7 @@
|
||||
"VCBAnimeMonitor": {
|
||||
"name": "整理VCB动漫压制组作品",
|
||||
"description": "提高部分VCB-Studio作品的识别准确率,将VCB-Studio的作品统一转移到指定目录同时进行刮削整理",
|
||||
"version": "1.6.6",
|
||||
"version": "1.7",
|
||||
"icon": "vcbmonitor.png",
|
||||
"author": "pixel@qingwa",
|
||||
"level": 2
|
||||
@@ -458,7 +458,7 @@
|
||||
"DownloaderHelper": {
|
||||
"name": "下载器助手",
|
||||
"description": "自动做种、站点标签、自动删种。",
|
||||
"version": "1.3",
|
||||
"version": "1.4",
|
||||
"icon": "DownloaderHelper.png",
|
||||
"author": "hotlcc",
|
||||
"level": 2
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import hashlib
|
||||
import os
|
||||
import re
|
||||
import time
|
||||
from datetime import datetime, timedelta
|
||||
from pathlib import Path
|
||||
from threading import Event
|
||||
@@ -42,6 +43,7 @@ class CSSiteConfig(object):
|
||||
cookie: str = None,
|
||||
ua: str = None,
|
||||
proxy: bool = None,
|
||||
query_gap: int = 1,
|
||||
) -> None:
|
||||
self.name = name
|
||||
self.url = url
|
||||
@@ -50,6 +52,7 @@ class CSSiteConfig(object):
|
||||
self.cookie = cookie
|
||||
self.ua = ua
|
||||
self.proxy = proxy
|
||||
self.query_gap = query_gap
|
||||
|
||||
def get_api_url(self):
|
||||
if self.name == "憨憨":
|
||||
@@ -160,6 +163,7 @@ class CrossSeedHelper(object):
|
||||
remote_torrent_infos.append(
|
||||
TorInfo.remote(site.name, pieces_hash, torrent_id)
|
||||
)
|
||||
time.sleep(site.query_gap)
|
||||
except requests.exceptions.RequestException as e:
|
||||
return None, f"站点{site.name}请求失败:{e}"
|
||||
return remote_torrent_infos, None
|
||||
@@ -173,7 +177,7 @@ class CrossSeed(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "qingwa.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.9"
|
||||
plugin_version = "2.0"
|
||||
# 插件作者
|
||||
plugin_author = "233@qingwa"
|
||||
# 作者主页
|
||||
@@ -240,7 +244,7 @@ class CrossSeed(_PluginBase):
|
||||
|
||||
self._downloaders = config.get("downloaders")
|
||||
self._torrentpath = config.get("torrentpath") # 种子路径和下载器对应 /qb,/tr
|
||||
self._torrentpaths = self._torrentpath.split(",")
|
||||
self._torrentpaths = self._torrentpath.strip().split(",")
|
||||
self._sites = config.get("sites") or []
|
||||
self._notify = config.get("notify")
|
||||
self._nolabels = config.get("nolabels")
|
||||
@@ -282,13 +286,21 @@ class CrossSeed(_PluginBase):
|
||||
)
|
||||
self._sites = [site.id for site in all_site_cs_info_map.values() if site.id in self._sites]
|
||||
site_names = [site.name for site in all_site_cs_info_map.values() if site.id in self._sites]
|
||||
|
||||
|
||||
# 整理passkey映射关系
|
||||
site_name_key_map = dict()
|
||||
site_name_gap_map = dict()
|
||||
for site_key in self._token.strip().split("\n"):
|
||||
site_key_arr = re.split("[\s::]+",site_key.strip())
|
||||
site_name = site_key_arr[0]
|
||||
site_name_key_map[site_name] = site_key_arr[1]
|
||||
if len(site_key_arr) > 2:
|
||||
if str.isdigit(site_key_arr[2]):
|
||||
site_name_gap_map[site_name] = int(site_key_arr[2])
|
||||
else:
|
||||
logger.warn(
|
||||
f"站点{site_name}配置的查询请求间隔时间不为整数,不能生效, 请修改 {site_key_arr[2]}"
|
||||
)
|
||||
|
||||
# 只给选中的站点补全站点配置
|
||||
self._site_cs_infos: List[CSSiteConfig] = []
|
||||
@@ -300,6 +312,10 @@ class CrossSeed(_PluginBase):
|
||||
continue
|
||||
site_cs_info = all_site_cs_info_map.get(site_name)
|
||||
site_cs_info.passkey = site_key
|
||||
# 追加设置的请求间隔时间
|
||||
site_query_gap = site_name_gap_map.get(site_name)
|
||||
if site_query_gap:
|
||||
site_cs_info.query_gap = site_query_gap
|
||||
self._site_cs_infos.append(site_cs_info)
|
||||
|
||||
self.__update_config()
|
||||
@@ -653,7 +669,7 @@ class CrossSeed(_PluginBase):
|
||||
'type': 'info',
|
||||
'variant': 'tonal',
|
||||
'text': '1. 定时任务周期建议每次辅种间隔时间大于1天,不填写每天上午2点到7点随机辅种一次; '
|
||||
'2. 支持辅种站点列表:青蛙【已验证】,AGSVPT,麒麟,UBits,聆音 等,配置passkey时,站点名称需严格和上面选项一致,只有选中的站点会辅种,passkey可保存多个; '
|
||||
'2. 支持辅种站点列表:青蛙、AGSVPT、红豆饭、麒麟、UBits、聆音等,配置passkey时,站点名称需严格和上面选项一致,只有选中的站点会辅种,passkey可保存多个; '
|
||||
'3. 请勿与IYUU辅种插件同时添加相同站点,可能会有冲突,且意义不大;'
|
||||
'4. 测试站点是否支持的方法:【站点域名/api/pieces-hash】接口访问返回405则大概率支持 '
|
||||
}
|
||||
@@ -661,6 +677,29 @@ class CrossSeed(_PluginBase):
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
'component': 'VRow',
|
||||
'content': [
|
||||
{
|
||||
'component': 'VCol',
|
||||
'props': {
|
||||
'cols': 12,
|
||||
},
|
||||
'content': [
|
||||
{
|
||||
'component': 'VAlert',
|
||||
'props': {
|
||||
'type': 'info',
|
||||
'variant': 'tonal',
|
||||
'text': '【进阶设置】如果辅种过程中访问/api/pieces-hash接口偶尔会失败,可以设置请求间隔时间。 '
|
||||
'可以在passkey后增加 :3 来将某个站点的请求间隔调整为3秒,3可以改为其他数字,只能为整数,默认请求间隔为1秒。 '
|
||||
'示例配置 站点名称:Passkey:3'
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class DownloaderHelper(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "DownloaderHelper.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.3"
|
||||
plugin_version = "1.4"
|
||||
# 插件作者
|
||||
plugin_author = "hotlcc"
|
||||
# 作者主页
|
||||
@@ -177,87 +177,90 @@ class DownloaderHelper(_PluginBase):
|
||||
'component': 'VCol',
|
||||
'props': {
|
||||
'cols': 12,
|
||||
'xxl': 3, 'xl': 3, 'lg': 3, 'md': 3, 'sm': 6, 'xs': 12,
|
||||
'title': '插件总开关'
|
||||
'md': 4,
|
||||
'xl': 3
|
||||
},
|
||||
'content': [{
|
||||
'component': 'VSwitch',
|
||||
'props': {
|
||||
'model': 'enable',
|
||||
'label': '启用插件'
|
||||
'label': '启用插件',
|
||||
'hint': '插件总开关'
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
'component': 'VCol',
|
||||
'props': {
|
||||
'cols': 12,
|
||||
'xxl': 3, 'xl': 3, 'lg': 3, 'md': 3, 'sm': 6, 'xs': 12,
|
||||
'title': '执行插件任务后是否发送通知'
|
||||
'md': 4,
|
||||
'xl': 3
|
||||
},
|
||||
'content': [{
|
||||
'component': 'VSwitch',
|
||||
'props': {
|
||||
'model': 'enable_notify',
|
||||
'label': '发送通知'
|
||||
'label': '发送通知',
|
||||
'hint': '执行插件任务后是否发送通知'
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
'component': 'VCol',
|
||||
'props': {
|
||||
'cols': 12,
|
||||
'xxl': 3, 'xl': 3, 'lg': 3, 'md': 3, 'sm': 6, 'xs': 12,
|
||||
'title': '保存插件配置后是否立即触发一次插件任务运行'
|
||||
'md': 4,
|
||||
'xl': 3
|
||||
},
|
||||
'content': [{
|
||||
'component': 'VSwitch',
|
||||
'props': {
|
||||
'model': 'run_once',
|
||||
'label': '立即运行一次'
|
||||
'label': '立即运行一次',
|
||||
'hint': '保存插件配置后是否立即触发一次插件任务运行'
|
||||
}
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
'component': 'VRow',
|
||||
'content': [{
|
||||
}, {
|
||||
'component': 'VCol',
|
||||
'props': {
|
||||
'cols': 12,
|
||||
'xxl': 3, 'xl': 3, 'lg': 3, 'md': 3, 'sm': 6, 'xs': 12,
|
||||
'title': '监听下载添加事件。当MoviePilot添加下载任务时,会触发执行本插件进行自动做种和添加站点标签。'
|
||||
'md': 4,
|
||||
'xl': 3
|
||||
},
|
||||
'content': [{
|
||||
'component': 'VSwitch',
|
||||
'props': {
|
||||
'model': 'listen_download_event',
|
||||
'label': '监听下载事件'
|
||||
'label': '监听下载事件',
|
||||
'hint': '监听下载添加事件。当MoviePilot添加下载任务时,会触发执行本插件进行自动做种和添加站点标签。'
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
'component': 'VCol',
|
||||
'props': {
|
||||
'cols': 12,
|
||||
'xxl': 3, 'xl': 3, 'lg': 3, 'md': 3, 'sm': 6, 'xs': 12,
|
||||
'title': '监听源文件删除事件。当在【历史记录】中删除源文件时,会自动触发运行本插件任务进行自动删种。'
|
||||
'md': 4,
|
||||
'xl': 3
|
||||
},
|
||||
'content': [{
|
||||
'component': 'VSwitch',
|
||||
'props': {
|
||||
'model': 'listen_source_file_event',
|
||||
'label': '监听源文件事件'
|
||||
'label': '监听源文件事件',
|
||||
'hint': '监听源文件删除事件。当在【历史记录】中删除源文件时,会自动触发运行本插件任务进行自动删种。'
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
'component': 'VCol',
|
||||
'props': {
|
||||
'cols': 12,
|
||||
'xxl': 3, 'xl': 3, 'lg': 3, 'md': 3, 'sm': 6, 'xs': 12,
|
||||
'title': '给种子添加站点标签时,是否优先以站点名称作为标签内容(否则将使用域名关键字)?'
|
||||
'md': 4,
|
||||
'xl': 3
|
||||
},
|
||||
'content': [{
|
||||
'component': 'VSwitch',
|
||||
'props': {
|
||||
'model': 'site_name_priority',
|
||||
'label': '站点名称优先'
|
||||
'label': '站点名称优先',
|
||||
'hint': '给种子添加站点标签时,是否优先以站点名称作为标签内容(否则将使用域名关键字)?'
|
||||
}
|
||||
}]
|
||||
}]
|
||||
@@ -267,44 +270,44 @@ class DownloaderHelper(_PluginBase):
|
||||
'component': 'VCol',
|
||||
'props': {
|
||||
'cols': 12,
|
||||
'xxl': 3, 'xl': 3, 'lg': 3, 'md': 3, 'sm': 6, 'xs': 12,
|
||||
'title': '设置插件任务执行周期。支持5位cron表达式,应避免任务执行过于频繁,例如:0/30 * * * *。缺省时不执行定时任务,但不影响监听任务的执行。'
|
||||
'md': 4
|
||||
},
|
||||
'content': [{
|
||||
'component': 'VTextField',
|
||||
'props': {
|
||||
'model': 'cron',
|
||||
'label': '定时执行周期',
|
||||
'placeholder': '0/30 * * * *'
|
||||
'placeholder': '0/30 * * * *',
|
||||
'hint': '设置插件任务执行周期。支持5位cron表达式,应避免任务执行过于频繁,例如:0/30 * * * *。缺省时不执行定时任务,但不影响监听任务的执行。'
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
'component': 'VCol',
|
||||
'props': {
|
||||
'cols': 12,
|
||||
'xxl': 3, 'xl': 3, 'lg': 3, 'md': 3, 'sm': 6, 'xs': 12,
|
||||
'title': '下载器中的种子有这些标签时不进行任何操作,多个标签使用英文“,”分割'
|
||||
'md': 4
|
||||
},
|
||||
'content': [{
|
||||
'component': 'VTextField',
|
||||
'props': {
|
||||
'model': 'exclude_tags',
|
||||
'label': '排除种子标签'
|
||||
'label': '排除种子标签',
|
||||
'hint': '下载器中的种子有这些标签时不进行任何操作,多个标签使用英文“,”分割'
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
'component': 'VCol',
|
||||
'props': {
|
||||
'cols': 12,
|
||||
'xxl': 3, 'xl': 3, 'lg': 3, 'md': 3, 'sm': 6, 'xs': 12,
|
||||
'title': '给种子添加站点标签时的标签前缀,默认值为“站点/”'
|
||||
'md': 4
|
||||
},
|
||||
'content': [{
|
||||
'component': 'VTextField',
|
||||
'props': {
|
||||
'model': 'tag_prefix',
|
||||
'label': '站点标签前缀',
|
||||
'placeholder': '站点/'
|
||||
'placeholder': '站点/',
|
||||
'hint': '给种子添加站点标签时的标签前缀,默认值为“站点/”'
|
||||
}
|
||||
}]
|
||||
}]
|
||||
@@ -313,8 +316,7 @@ class DownloaderHelper(_PluginBase):
|
||||
'content': [{
|
||||
'component': 'VCol',
|
||||
'props': {
|
||||
'cols': 12,
|
||||
'title': 'Tracker映射。用于在站点打标签时,指定tracker和站点域名不同的种子的域名对应关系;前面为tracker域名(完整域名或者主域名皆可),中间是英文冒号,后面是站点域名。'
|
||||
'cols': 12
|
||||
},
|
||||
'content': [{
|
||||
'component': 'VTextarea',
|
||||
@@ -324,7 +326,8 @@ class DownloaderHelper(_PluginBase):
|
||||
'placeholder': '格式:\n'
|
||||
'<tracker-domain>:<site-domain>\n'
|
||||
'例如:\n'
|
||||
'chdbits.xyz:ptchdbits.co'
|
||||
'chdbits.xyz:ptchdbits.co',
|
||||
'hint': 'Tracker映射。用于在站点打标签时,指定tracker和站点域名不同的种子的域名对应关系;前面为tracker域名(完整域名或者主域名皆可),中间是英文冒号,后面是站点域名。'
|
||||
}
|
||||
}]
|
||||
}]
|
||||
@@ -373,7 +376,8 @@ class DownloaderHelper(_PluginBase):
|
||||
'component': 'VSwitch',
|
||||
'props': {
|
||||
'model': 'qb_enable',
|
||||
'label': '任务开关'
|
||||
'label': '任务开关',
|
||||
'hint': '该下载器子任务的开关'
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
@@ -386,7 +390,8 @@ class DownloaderHelper(_PluginBase):
|
||||
'component': 'VSwitch',
|
||||
'props': {
|
||||
'model': 'qb_enable_seeding',
|
||||
'label': '自动做种'
|
||||
'label': '自动做种',
|
||||
'hint': '是否开启自动做种功能'
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
@@ -399,7 +404,8 @@ class DownloaderHelper(_PluginBase):
|
||||
'component': 'VSwitch',
|
||||
'props': {
|
||||
'model': 'qb_enable_tagging',
|
||||
'label': '站点标签'
|
||||
'label': '站点标签',
|
||||
'hint': '是否开启站点标签功能'
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
@@ -412,7 +418,8 @@ class DownloaderHelper(_PluginBase):
|
||||
'component': 'VSwitch',
|
||||
'props': {
|
||||
'model': 'qb_enable_delete',
|
||||
'label': '自动删种'
|
||||
'label': '自动删种',
|
||||
'hint': '是否开启自动删种功能'
|
||||
}
|
||||
}]
|
||||
}]
|
||||
|
||||
@@ -77,7 +77,7 @@ class VCBAnimeMonitor(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "vcbmonitor.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.6.6"
|
||||
plugin_version = "1.7"
|
||||
# 插件作者
|
||||
plugin_author = "pixel@qingwa"
|
||||
# 作者主页
|
||||
@@ -393,15 +393,15 @@ class VCBAnimeMonitor(_PluginBase):
|
||||
if remeta.is_special and not self._switch_ova:
|
||||
logger.warn(f"{file_path.name} 为OVA资源,未开启OVA开关,不处理")
|
||||
return
|
||||
else:
|
||||
ova_history_ep = 1
|
||||
if remeta.is_special and self._switch_ova:
|
||||
logger.info(f"{file_path.name} 为OVA资源,开始处理")
|
||||
if self.get_data(key=f"OVA_{file_meta.title}") is not None:
|
||||
ova_history_ep = int(self.get_data(key=f"OVA_{file_meta.title}"))
|
||||
self.save_data(key=f"OVA_{file_meta.title}", value=ova_history_ep + 1)
|
||||
file_meta.begin_episode = ova_history_ep + 1
|
||||
else:
|
||||
ova_history_ep = int(self.get_data(key=f"OVA_{file_meta.title}"))+1
|
||||
file_meta.begin_episode = ova_history_ep
|
||||
self.save_data(key=f"OVA_{file_meta.title}", value=ova_history_ep + 1)
|
||||
self.save_data(key=f"OVA_{file_meta.title}", value=ova_history_ep)
|
||||
else:
|
||||
file_meta.begin_episode = 1
|
||||
self.save_data(key=f"OVA_{file_meta.title}", value=1)
|
||||
else:
|
||||
return
|
||||
|
||||
@@ -1015,7 +1015,8 @@ class VCBAnimeMonitor(_PluginBase):
|
||||
'props': {
|
||||
'type': 'info',
|
||||
'variant': 'tonal',
|
||||
'text': '核心用法与目录同步插件相同,不同点在于只识别处理VCB-Studio资源,\n'
|
||||
'text': '核心用法与目录同步插件相同,不同点在于只识别处理VCB-Studio资源,'
|
||||
'避免与目录同步插件的监控目录相同(否则会同时进行识别)'
|
||||
'不处理SPs目录下的文件,OVA/OAD集数根据入库顺序累加命名,不保证与TMDB集数匹配'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
roman~=4.1
|
||||
roman~=4.1
|
||||
|
||||
Reference in New Issue
Block a user