feat: adapt to Pydantic V2

This commit is contained in:
Attente
2025-11-01 17:56:37 +08:00
parent fcd0908032
commit c7f098771b
10 changed files with 12 additions and 13 deletions

View File

@@ -621,7 +621,7 @@ class Settings(BaseSettings, ConfigModel, LogConfigModel):
return False, f"配置项 '{key}' 不存在"
try:
field = self.__fields__[key]
field = Settings.model_fields[key]
original_value = getattr(self, key)
if field.name == "API_TOKEN":
converted_value, needs_update = self.validate_api_token(value, original_value)

View File

@@ -257,7 +257,7 @@ class MediaInfo:
# 评价数量
vote_count: int = None
# 流行度
popularity: int = None
popularity: float = None
# 时长
runtime: int = None
# 下一集