Commit Graph

20 Commits

Author SHA1 Message Date
f103b6c253 feat: multi-platform URL & playlist support via yt-dlp probe
Generalize URL handling beyond YouTube to any yt-dlp-supported site
(SoundCloud, Bandcamp, etc), single tracks and playlists/sets/albums.

- probe_url(): one yt-dlp --flat-playlist probe classifies playlist vs track
  and returns per-entry Hits; YouTube playlists still use ytmusicapi.
- _track_url(): YouTube tracks keep the music.youtube album-art URL; other
  platforms download via their native entry URL (no more videoId reconstruction).
- Per-source folders: <root>/<artist>/<extractor>/ (soundcloud/bandcamp/youtube)
  instead of hardcoded youtube; download_single derives source from metadata.
- download_hits() downloads pre-probed Hits; API probes once and passes hits
  into the job closure. Replaces YouTube-only is_playlist_url/expand_playlist.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 00:25:58 -07:00
0f7ddd7697 feat(server): route URL/playlist /fetch to download jobs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 23:58:37 -07:00
ca36d2bb27 feat(server): re-export URL helpers; callable job done_message
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 23:54:49 -07:00
aa9d177ed1 feat(youtube): playlist expansion + per-track download, success bools
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 23:49:26 -07:00
3ee49b17bd fix(lidarr): select metadata/quality profiles by name with env overrides
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 23:44:34 -07:00
b99e5eb9cb fix(lidarr): prefer own-artist studio album over various-artists comps
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 23:30:15 -07:00
18f72a5626 feat(lidarr): exact MBID album lookup via MusicBrainz resolution
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 23:22:11 -07:00
babbd84fda feat(lidarr): MusicBrainz track-to-album resolver
Add musicbrainz_best_album() that resolves an artist+track pair to its
best studio album via the MusicBrainz search API, with a 1 req/sec
courtesy rate-limiter. Prefers plain studio albums over compilations,
singles, and live releases; falls back to any release group when no
studio album is found. Never raises — returns None on any failure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 23:17:43 -07:00
b0e3ce6e6c feat(lidarr): add Artist - Track query splitter 2026-06-08 21:08:02 -07:00
425a973d85 fix: write single first-artist tag, not doubled/multi-artist
Live end-to-end test surfaced two bugs in youtube tagging:
- `--replace-in-metadata artist .* NAME` matched twice and doubled the
  artist tag (e.g. "SLVMLORDSLVMLORD"). Anchor with ^.*$ to match once.
- Use only the first artist when several are present (SLVMLORD, not
  "SLVMLORD, Travis Bradley, ...") for both the embedded tag and the
  spoken/echoed API messages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 20:39:03 -07:00
9984c162c6 fix(server): return {message} body for request validation errors
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 20:27:00 -07:00
5b6986e01c test(server): cover validation 422s and pick-None 404; tighten message assert
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 20:18:54 -07:00
d4c1b18e58 feat(server): /fetch and /jobs endpoints with async download jobs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 20:15:28 -07:00
49a45e6270 feat(server): FastAPI app with API-key auth and health check
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 20:09:50 -07:00
257ed5e0a5 fix(server): announce track title not album in messages; cover error paths
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 20:07:09 -07:00
9912eb48a4 feat(server): action dispatch with structured result and messages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 20:02:18 -07:00
09a0d7e682 fix(server): harden job eviction and worker against missing job id
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 19:59:31 -07:00
35df01f08e feat(server): in-memory async job store with thread-pool worker
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 19:55:57 -07:00
c46ff2ff1a refactor(server): register loaded module in sys.modules, add __all__
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 19:54:37 -07:00
ad660afae3 feat(server): load musicfetch binary as importable module
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 19:49:18 -07:00