Add read-only NAS and WebDAV photo sources with random scheduling
This commit is contained in:
@@ -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"),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user