Add read-only NAS and WebDAV photo sources with random scheduling

This commit is contained in:
Pigway
2026-10-05 00:52:39 +08:00
parent b530e32c65
commit f5ab1ade77
18 changed files with 5578 additions and 84 deletions
+9 -1
View File
@@ -60,13 +60,21 @@ class TemplateContent(StrictModel):
profile: Profile = Profile.color
class PhotoSourceContent(StrictModel):
type: Literal["photo_source"]
source_id: str = Field(pattern=r"^[a-z0-9-]{1,60}$")
item_id: str | None = Field(default=None, max_length=2048)
fit: Fit = Fit.contain
profile: Profile = Profile.color
class FutureContent(StrictModel):
type: Literal["html", "markdown"]
data: str = ""
Content = Annotated[
ImageContent | URLContent | TemplateContent | FutureContent,
ImageContent | URLContent | TemplateContent | PhotoSourceContent | FutureContent,
Field(discriminator="type"),
]