mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-12 06:55:49 +08:00
🎨 优化core全部更新
和core应用设置代理
时对插件的判断
This commit is contained in:
parent
38050c74d6
commit
80622adf01
@ -74,15 +74,25 @@ def check_retcode(retcode: int) -> str:
|
|||||||
async def update_all_plugins() -> List[str]:
|
async def update_all_plugins() -> List[str]:
|
||||||
log_list = []
|
log_list = []
|
||||||
for plugin in PLUGINS_PATH.iterdir():
|
for plugin in PLUGINS_PATH.iterdir():
|
||||||
if plugin.is_dir():
|
if _is_plugin(plugin):
|
||||||
log_list.extend(update_from_git(0, plugin))
|
log_list.extend(update_from_git(0, plugin))
|
||||||
return log_list
|
return log_list
|
||||||
|
|
||||||
|
|
||||||
|
def _is_plugin(plugin: Path) -> bool:
|
||||||
|
if (
|
||||||
|
plugin.is_dir()
|
||||||
|
and plugin.name != '__pycache__'
|
||||||
|
and plugin.name != 'core_command'
|
||||||
|
):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
async def set_proxy_all_plugins(proxy: Optional[str] = None) -> List[str]:
|
async def set_proxy_all_plugins(proxy: Optional[str] = None) -> List[str]:
|
||||||
log_list = []
|
log_list = []
|
||||||
for plugin in PLUGINS_PATH.iterdir():
|
for plugin in PLUGINS_PATH.iterdir():
|
||||||
if plugin.is_dir():
|
if _is_plugin(plugin):
|
||||||
log_list.append(await set_proxy(plugin, proxy))
|
log_list.append(await set_proxy(plugin, proxy))
|
||||||
log_list.append(await set_proxy(CORE_PATH, proxy))
|
log_list.append(await set_proxy(CORE_PATH, proxy))
|
||||||
return log_list
|
return log_list
|
||||||
|
Loading…
x
Reference in New Issue
Block a user