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>
This commit is contained in:
@@ -25,10 +25,10 @@ act_lidarr_album = _mod.act_lidarr_album
|
||||
act_lidarr_artist = _mod.act_lidarr_artist
|
||||
QUALITY_CHOICES = _mod.QUALITY_CHOICES
|
||||
is_url = _mod.is_url
|
||||
is_playlist_url = _mod.is_playlist_url
|
||||
download_playlist = _mod.download_playlist
|
||||
probe_url = _mod.probe_url
|
||||
download_hits = _mod.download_hits
|
||||
download_single = _mod.download_single
|
||||
|
||||
__all__ = ["Hit", "build_combined_hits", "pick", "act_youtube",
|
||||
"act_lidarr_album", "act_lidarr_artist", "QUALITY_CHOICES",
|
||||
"is_url", "is_playlist_url", "download_playlist", "download_single"]
|
||||
"is_url", "probe_url", "download_hits", "download_single"]
|
||||
|
||||
Reference in New Issue
Block a user