Skip to content

Commit

Permalink
add slideshow setting
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicWindisch committed Feb 17, 2024
1 parent b723e83 commit 1a68d79
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion photobooth/services/config/groups/uisettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pathlib import Path
from typing import Any

from pydantic import Field
from pydantic import Field, validator
from pydantic.fields import FieldInfo
from pydantic_settings import BaseSettings, PydanticBaseSettingsSource, SettingsConfigDict

Expand Down Expand Up @@ -99,6 +99,18 @@ class GroupUiSettings(BaseSettings):
description="Show button to admin center, usually only during setup.",
)

show_automatic_slideshow_timeout: int = Field(
default=300, description="Timeout (seconds) after which a random order slideshow of all images is started. Set to 0 to disable."
)

@validator("show_automatic_slideshow_timeout")
def allow_zero_or_large(cls, v):
if v < 0:
raise ValueError("ensure this value is not negative")
if v > 0 and v < 30:
raise ValueError("ensure this value is at least 30")
return v

livestream_mirror_effect: bool = Field(
default=True,
description="Flip livestream horizontally to create a mirror effect feeling more natural to users.",
Expand Down

0 comments on commit 1a68d79

Please sign in to comment.