feat: 移除更新类型字段

This commit is contained in:
DLmaster361
2025-09-14 00:37:43 +08:00
parent c4d1ed3184
commit 6846415899
6 changed files with 3 additions and 37 deletions

View File

@@ -111,9 +111,6 @@ class GlobalConfig(ConfigBase):
Notify_CompanyWebHookBotUrl = ConfigItem("Notify", "CompanyWebHookBotUrl", "")
Update_IfAutoUpdate = ConfigItem("Update", "IfAutoUpdate", False, BoolValidator())
Update_UpdateType = ConfigItem(
"Update", "UpdateType", "stable", OptionsValidator(["stable", "beta"])
)
Update_Source = ConfigItem(
"Update",
"Source",

View File

@@ -140,9 +140,6 @@ class GlobalConfig_Notify(BaseModel):
class GlobalConfig_Update(BaseModel):
IfAutoUpdate: Optional[bool] = Field(default=None, description="是否自动更新")
UpdateType: Optional[Literal["stable", "beta"]] = Field(
default=None, description="更新类型, stable为稳定版, beta为测试版"
)
Source: Optional[Literal["GitHub", "MirrorChyan", "AutoSite"]] = Field(
default=None, description="更新源: GitHub源, Mirror酱源, 自建源"
)

View File

@@ -71,7 +71,7 @@ class _UpdateHandler:
logger.info("开始检查更新")
response = requests.get(
f"https://mirrorchyan.com/api/resources/AUTO_MAA/latest?user_agent=AutoMasGui&current_version={current_version}&cdk={Config.get('Update', 'MirrorChyanCDK')}&channel={Config.get('Update', 'UpdateType')}",
f"https://mirrorchyan.com/api/resources/AUTO_MAA/latest?user_agent=AutoMasGui&current_version={current_version}&cdk={Config.get('Update', 'MirrorChyanCDK')}&channel=stable",
timeout=10,
proxies=Config.get_proxies(),
)