mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
fix: 增加插件 V3t 运行时兼容门禁 (#6475)
* fix(plugin): enforce declared runtime compatibility * chore(ci): record plugin runtime compatibility edges --------- Co-authored-by: jxxghp <jxxghp@gmail.com>
This commit is contained in:
Vendored
+5
@@ -32,6 +32,7 @@ from importlib.metadata import distributions
|
||||
from requests import Response
|
||||
|
||||
from app.runtime.cache import cached, is_fresh
|
||||
from app.foundation.environment import is_free_threaded_runtime
|
||||
from app.runtime.dependencies import (
|
||||
iter_runtime_profile_requirement_strings,
|
||||
iter_runtime_requirement_strings,
|
||||
@@ -369,6 +370,8 @@ class PluginHelper(metaclass=WeakSingleton):
|
||||
"""
|
||||
if not isinstance(plugin_info, dict):
|
||||
return False
|
||||
if is_free_threaded_runtime() and plugin_info.get("v3t") is False:
|
||||
return False
|
||||
if not get_runtime_setting('VERSION_FLAG'):
|
||||
return True
|
||||
current_flag = get_runtime_setting('VERSION_FLAG')
|
||||
@@ -397,6 +400,8 @@ class PluginHelper(metaclass=WeakSingleton):
|
||||
"""
|
||||
if not isinstance(plugin_info, dict):
|
||||
return False
|
||||
if is_free_threaded_runtime() and plugin_info.get("v3t") is False:
|
||||
return False
|
||||
current_flag = get_runtime_setting('VERSION_FLAG')
|
||||
if not current_flag:
|
||||
return not package_version
|
||||
|
||||
Reference in New Issue
Block a user