mirror of
https://github.com/d0zingcat/MoviePilot-Plugins.git
synced 2026-05-13 23:16:47 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
10
package.json
10
package.json
@@ -202,12 +202,13 @@
|
||||
"CrossSeed": {
|
||||
"name": "青蛙辅种助手",
|
||||
"description": "参考ReseedPuppy和IYUU辅种插件实现自动辅种,支持站点:青蛙、AGSVPT、麒麟、UBits、聆音、憨憨等。",
|
||||
"version": "2.2",
|
||||
"version": "2.3",
|
||||
"icon": "qingwa.png",
|
||||
"author": "233@qingwa",
|
||||
"level": 2,
|
||||
"history": {
|
||||
"v2.2": "站点停用后会同步暂停对该站点的辅种"
|
||||
"v2.2": "站点停用后会同步暂停对该站点的辅种",
|
||||
"v2.3": "站点辅种支持代理"
|
||||
}
|
||||
},
|
||||
"VCBAnimeMonitor": {
|
||||
@@ -245,11 +246,12 @@
|
||||
"BrushFlow": {
|
||||
"name": "站点刷流",
|
||||
"description": "自动托管刷流,将会提高对应站点的访问频率。",
|
||||
"version": "2.8",
|
||||
"version": "2.9",
|
||||
"icon": "brush.jpg",
|
||||
"author": "jxxghp,InfinityPacer",
|
||||
"level": 2,
|
||||
"history": {
|
||||
"v2.9": "优化动态删除消息推送,优化配置页UI显示及部分配置项,支持配置种子分类以及开启自动分类管理,取消单独适配站点时区逻辑,可通过配置项「pubtime」自行适配",
|
||||
"v2.8": "优化UI显示以及提升性能",
|
||||
"v2.7": "动态删除种子规则调整(请注意查阅插件文档),站点独立配置样式优化、日志优化,修复部分配置项无法配置小数的问题,修复部分场景可能导致重复下载的问题",
|
||||
"v2.6": "修复排除订阅功能",
|
||||
@@ -530,7 +532,7 @@
|
||||
"PluginAutoUpgrade": {
|
||||
"name": "插件自动升级",
|
||||
"description": "定时检测、升级插件。",
|
||||
"version": "1.2",
|
||||
"version": "1.4",
|
||||
"icon": "PluginAutoUpgrade.png",
|
||||
"author": "hotlcc",
|
||||
"level": 1
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -154,7 +154,11 @@ class CrossSeedHelper(object):
|
||||
remote_torrent_infos = []
|
||||
try:
|
||||
response = requests.post(
|
||||
site.get_api_url(), headers=headers, json=data, timeout=10
|
||||
site.get_api_url(),
|
||||
headers=headers,
|
||||
json=data,
|
||||
timeout=10,
|
||||
proxies=settings.PROXY if site.proxy else None,
|
||||
)
|
||||
response.raise_for_status()
|
||||
rsp_body = response.json()
|
||||
@@ -177,7 +181,7 @@ class CrossSeed(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "qingwa.png"
|
||||
# 插件版本
|
||||
plugin_version = "2.2"
|
||||
plugin_version = "2.3"
|
||||
# 插件作者
|
||||
plugin_author = "233@qingwa"
|
||||
# 作者主页
|
||||
|
||||
@@ -23,7 +23,7 @@ class PluginAutoUpgrade(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "PluginAutoUpgrade.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.2"
|
||||
plugin_version = "1.4"
|
||||
# 插件作者
|
||||
plugin_author = "hotlcc"
|
||||
# 作者主页
|
||||
@@ -248,21 +248,33 @@ class PluginAutoUpgrade(_PluginBase):
|
||||
'content': [{
|
||||
'component': 'td',
|
||||
'props': {
|
||||
'class': 'whitespace-nowrap break-keep text-high-emphasis'
|
||||
'class': 'whitespace-nowrap'
|
||||
},
|
||||
'text': item.get('datetime_str')
|
||||
}, {
|
||||
'component': 'td',
|
||||
'props': {
|
||||
'class': 'whitespace-nowrap'
|
||||
},
|
||||
'text': item.get('plugin_name')
|
||||
}, {
|
||||
'component': 'td',
|
||||
'props': {
|
||||
'class': 'whitespace-nowrap'
|
||||
},
|
||||
'text': f'v{item.get("old_plugin_version")}'
|
||||
}, {
|
||||
'component': 'td',
|
||||
'props': {
|
||||
'class': 'whitespace-nowrap'
|
||||
},
|
||||
'text': f'v{item.get("new_plugin_version")}'
|
||||
}, {
|
||||
'component': 'td',
|
||||
'text': item.get('info')
|
||||
}, {
|
||||
'component': 'td',
|
||||
'text': item.get('upgrade_info')
|
||||
}]
|
||||
} for item in page_data if item]
|
||||
else:
|
||||
@@ -274,7 +286,7 @@ class PluginAutoUpgrade(_PluginBase):
|
||||
'content': [{
|
||||
'component': 'td',
|
||||
'props': {
|
||||
'colspan': '5',
|
||||
'colspan': '6',
|
||||
'class': 'text-center'
|
||||
},
|
||||
'text': '暂无数据'
|
||||
@@ -292,7 +304,7 @@ class PluginAutoUpgrade(_PluginBase):
|
||||
'props': {
|
||||
'class': 'text-start ps-4'
|
||||
},
|
||||
'text': '升级时间'
|
||||
'text': '时间'
|
||||
}, {
|
||||
'component': 'th',
|
||||
'props': {
|
||||
@@ -304,19 +316,25 @@ class PluginAutoUpgrade(_PluginBase):
|
||||
'props': {
|
||||
'class': 'text-start ps-4'
|
||||
},
|
||||
'text': '升级前版本'
|
||||
'text': '旧版本'
|
||||
}, {
|
||||
'component': 'th',
|
||||
'props': {
|
||||
'class': 'text-start ps-4'
|
||||
},
|
||||
'text': '升级后版本'
|
||||
'text': '新版本'
|
||||
}, {
|
||||
'component': 'th',
|
||||
'props': {
|
||||
'class': 'text-start ps-4'
|
||||
},
|
||||
'text': '结果'
|
||||
'text': '执行结果'
|
||||
}, {
|
||||
'component': 'th',
|
||||
'props': {
|
||||
'class': 'text-start ps-4'
|
||||
},
|
||||
'text': '升级描述'
|
||||
}]
|
||||
}, {
|
||||
'component': 'tbody',
|
||||
@@ -552,7 +570,7 @@ class PluginAutoUpgrade(_PluginBase):
|
||||
if not installed_local_plugin:
|
||||
return None
|
||||
success, message = self.__install_plugin(plugin_id=online_plugin.id, repo_url=online_plugin.repo_url, force=True)
|
||||
logger.info(f"插件升级结果: plugin_name = {online_plugin.plugin_name}, plugin_version = v{installed_local_plugin.plugin_version} -> v{online_plugin.plugin_version}, success = {response.success}, message = {response.message}")
|
||||
logger.info(f"插件升级结果: plugin_name = {online_plugin.plugin_name}, plugin_version = v{installed_local_plugin.plugin_version} -> v{online_plugin.plugin_version}, success = {success}, message = {message}")
|
||||
return {
|
||||
'success': success,
|
||||
'message': message,
|
||||
@@ -560,7 +578,8 @@ class PluginAutoUpgrade(_PluginBase):
|
||||
'plugin_name': online_plugin.plugin_name,
|
||||
'new_plugin_version': online_plugin.plugin_version,
|
||||
'old_plugin_version': installed_local_plugin.plugin_version,
|
||||
'datetime_str': datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
'datetime_str': datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'upgrade_info': self.__extract_upgrade_history(online_plugin)
|
||||
}
|
||||
|
||||
def __send_notify(self, results: List[Dict[str, Any]]):
|
||||
@@ -592,7 +611,7 @@ class PluginAutoUpgrade(_PluginBase):
|
||||
else:
|
||||
text += f"{result.get('message')}\n"
|
||||
return text
|
||||
|
||||
|
||||
def __save_upgrade_records(self, records: List[Dict[str, Any]]):
|
||||
"""
|
||||
保存升级记录
|
||||
@@ -628,3 +647,20 @@ class PluginAutoUpgrade(_PluginBase):
|
||||
# 按时间倒序
|
||||
page_data = sorted(page_data, key=lambda item: item.get("datetime_str"), reverse=True)
|
||||
return page_data
|
||||
|
||||
@staticmethod
|
||||
def __extract_upgrade_history(plugin: schemas.Plugin, version: str = None) -> str:
|
||||
"""
|
||||
提取指定版本的升级历史信息
|
||||
"""
|
||||
if not plugin or not plugin.history:
|
||||
return None
|
||||
if not version:
|
||||
version = plugin.plugin_version
|
||||
if not version:
|
||||
return None
|
||||
version_history = plugin.history.get(f'v{version}')
|
||||
if not version_history:
|
||||
# 兼容处理
|
||||
version_history = plugin.history.get(version)
|
||||
return version_history
|
||||
|
||||
Reference in New Issue
Block a user