mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-04 23:17:20 +08:00
feat(system): add staged release updates
This commit is contained in:
+27
-1
@@ -1,5 +1,5 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional, Any
|
||||
from typing import Optional, Any, Literal
|
||||
|
||||
from pydantic import BaseModel, Field, field_validator
|
||||
|
||||
@@ -142,6 +142,32 @@ class SystemEnvironmentUpdateData(BaseModel):
|
||||
failed_updates: dict[str, tuple[Optional[bool], str]] = Field(default_factory=dict)
|
||||
|
||||
|
||||
class SystemUpdateStatus(BaseModel):
|
||||
"""主程序后台更新的可恢复状态快照。"""
|
||||
|
||||
state: Literal[
|
||||
"idle",
|
||||
"available",
|
||||
"downloading",
|
||||
"ready",
|
||||
"installing",
|
||||
"failed",
|
||||
] = "idle"
|
||||
current_version: str
|
||||
version: Optional[str] = None
|
||||
frontend_version: Optional[str] = None
|
||||
release_name: Optional[str] = None
|
||||
release_notes: Optional[str] = None
|
||||
published_at: Optional[str] = None
|
||||
checked_at: Optional[str] = None
|
||||
downloaded_bytes: int = 0
|
||||
total_bytes: int = 0
|
||||
progress: int = 0
|
||||
error: Optional[str] = None
|
||||
can_update: bool = False
|
||||
can_install: bool = False
|
||||
|
||||
|
||||
class PluginMarketSyncData(BaseModel):
|
||||
"""Wiki 插件市场仓库同步结果。"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user