feat: search and download from YouTube Music
- search music.youtube.com with the Songs filter and resolve each hit so results carry canonical artist, album and duration - fall back to plain ytsearch when the Music search fails - download the Music watch URL first and the regular YouTube URL second - parse explicit artist fields and drop channel/album/playlist entries - update the smoke stub, docs and tests
This commit is contained in:
1 parent
61d8b58223
commit
515b9bbe1b
6 files changed
+215
-29
No files matched your search
+6
-6
@@ -59,14 +59,14 @@ for arg in "$@"; do
|
||||
prev="$arg"
|
||||
done
|
||||
|
||||
if [[ " $* " == *" --flat-playlist "* ]]; then
|
||||
if [[ " $* " == *" music.youtube.com/search "* || " $* " == *" --flat-playlist "* ]]; then
|
||||
cat <<'JSON'
|
||||
{"entries":[
|
||||
{"id":"vid-seed-1","title":"Seed Artist - Seed One","duration":180,"channel":"Seed Artist"},
|
||||
{"id":"vid-rec-a","title":"New Artist - Downloaded Track","duration":180,"channel":"New Artist","thumbnail":"https://example/a.jpg"},
|
||||
{"id":"vid-rec-b","title":"Other Artist - Another Track","duration":200,"channel":"Other Artist"},
|
||||
{"id":"vid-long","title":"Long Set","duration":900,"channel":"DJ"},
|
||||
{"id":"vid-short","title":"Interlude","duration":10,"channel":"DJ"}
|
||||
{"id":"vid-seed-1","title":"Seed One","artist":"Seed Artist","album":"Seed Album","duration":180,"channel":"Seed Artist"},
|
||||
{"id":"vid-rec-a","title":"Downloaded Track","artist":"New Artist","album":"New Album","duration":180,"channel":"New Artist","thumbnail":"https://example/a.jpg"},
|
||||
{"id":"vid-rec-b","title":"Another Track","artist":"Other Artist","album":"Other Album","duration":200,"channel":"Other Artist"},
|
||||
{"id":"vid-long","title":"Long Set","artist":"DJ","duration":900,"channel":"DJ"},
|
||||
{"id":"vid-short","title":"Interlude","artist":"DJ","duration":10,"channel":"DJ"}
|
||||
]}
|
||||
JSON
|
||||
exit 0
|
||||
|
||||
Reference in new issue
Block a user