Adds a Settings panel to upload a cookies.txt file directly from the browser, persisted in a named Docker volume. yt-dlp uses the file when present to bypass YouTube bot detection.
14 lines
279 B
Python
14 lines
279 B
Python
from pydantic_settings import BaseSettings
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
max_upload_size_mb: int = 500
|
|
yt_dlp_cookies_file: str = ""
|
|
|
|
@property
|
|
def max_upload_size_bytes(self) -> int:
|
|
return self.max_upload_size_mb * 1024 * 1024
|
|
|
|
|
|
settings = Settings()
|