2026-03-12 01:16:51 -04:00
|
|
|
from pydantic_settings import BaseSettings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Settings(BaseSettings):
|
2026-04-01 22:20:18 -04:00
|
|
|
model_config = {"env_prefix": "NTR_", "env_file": ".env", "env_file_encoding": "utf-8"}
|
2026-03-12 01:16:51 -04:00
|
|
|
|
|
|
|
|
port: int = 8000
|
|
|
|
|
host: str = "127.0.0.1"
|
|
|
|
|
db_path: str = "./ntr_fetcher.db"
|
|
|
|
|
poll_interval_seconds: int = 3600
|
|
|
|
|
admin_token: str
|
|
|
|
|
soundcloud_user: str = "nicktherat"
|
|
|
|
|
show_day: int = 2
|
|
|
|
|
show_hour: int = 22
|
2026-04-01 21:29:42 -04:00
|
|
|
show_rotation_delay_hours: int = 0
|
2026-03-12 07:12:10 -04:00
|
|
|
|
|
|
|
|
web_user: str | None = None
|
|
|
|
|
web_password: str | None = None
|
|
|
|
|
secret_key: str | None = None
|
|
|
|
|
|
2026-04-01 22:20:18 -04:00
|
|
|
ping_target: str | None = None
|
|
|
|
|
ping_message: str | None = None
|
|
|
|
|
|
2026-03-12 07:12:10 -04:00
|
|
|
@property
|
|
|
|
|
def dashboard_enabled(self) -> bool:
|
|
|
|
|
return all([self.web_user, self.web_password, self.secret_key])
|