feat(sources): YouTube Music search + download pipeline (§1C/§1E)
Pluggable fetch source: ytmusicapi search + yt-dlp download (cookies-file guard), DownloadJob entity/repo + DownloadService, download_task worker with exponential-backoff retries, and wired /search, /sources/{source}/search, and /downloads endpoints. Adds youtube_enabled/cookies config, yt-dlp+ytmusicapi deps, and the download_jobs.track_id migration. Snapshot also bundles in-progress storage/tracks/acoustid edits.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -71,6 +71,9 @@ class Settings(BaseSettings):
|
||||
media_path: Path = Path("/data/media")
|
||||
transcode_cache_path: Path = Path("/data/transcode-cache")
|
||||
max_parallel_downloads: int = 2
|
||||
# How many times the download worker retries a failed fetch (yt-dlp fails
|
||||
# often) before marking the job ``failed`` — exponential backoff between tries.
|
||||
download_max_retries: int = 3
|
||||
storage_backend: Literal["local", "s3"] = "local"
|
||||
upload_tmp_dir: Path | None = None
|
||||
|
||||
@@ -100,6 +103,11 @@ class Settings(BaseSettings):
|
||||
# deployments should set their own contact email; see
|
||||
# ``musicbrainz_user_agent`` below for how it's used.
|
||||
musicbrainz_owner_email: str | None = None
|
||||
# ``youtube`` fetch source (search + download via ytmusicapi/yt-dlp). Enabled
|
||||
# by default; the source still reports unavailable if the libs aren't present.
|
||||
youtube_enabled: bool = True
|
||||
# Optional cookies file (Netscape format) for yt-dlp — lets it fetch
|
||||
# age-restricted / region-locked items via an authenticated session.
|
||||
youtube_cookies_path: Path | None = None
|
||||
|
||||
# -- enrichment -------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user