28 lines
898 B
Python
28 lines
898 B
Python
import os
|
|
from pathlib import Path
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv()
|
|
|
|
|
|
def _require(key: str) -> str:
|
|
value = os.getenv(key)
|
|
if not value:
|
|
raise RuntimeError(f"Missing required environment variable: {key}")
|
|
return value
|
|
|
|
|
|
SIGNAL_PHONE: str = _require("SIGNAL_PHONE")
|
|
SIGNAL_HOST: str = os.getenv("SIGNAL_HOST", "localhost")
|
|
SIGNAL_PORT: int = int(os.getenv("SIGNAL_PORT", "7583"))
|
|
|
|
QOBUZ_EMAIL: str = _require("QOBUZ_EMAIL")
|
|
QOBUZ_PASSWORD: str = _require("QOBUZ_PASSWORD")
|
|
QOBUZ_QUALITY: int = int(os.getenv("QOBUZ_QUALITY", "27")) # 5=MP3, 6=FLAC 16, 7=FLAC 24/96, 27=FLAC 24/192
|
|
|
|
DOWNLOAD_DIR: Path = Path(os.getenv("DOWNLOAD_DIR", "~/Music")).expanduser()
|
|
MAX_ARTIST_ALBUMS: int = int(os.getenv("MAX_ARTIST_ALBUMS", "5"))
|
|
SEARCH_ARTIST_LIMIT: int = int(os.getenv("SEARCH_ARTIST_LIMIT", "3"))
|
|
SEARCH_ALBUM_LIMIT: int = int(os.getenv("SEARCH_ALBUM_LIMIT", "5"))
|