Closed Rio6 closed 4 years ago
Oh huh, bailing out seems reasonable. It seems to fallback to dumping the playlist even though --no-playlist
was requested, since it's the only data it can reasonably return.
However, it defaults to full mode, so it takes a while before parsing completes (and then errors). I think that means we want to change the arguments to youtube-dl --flat-playlist --no-playlist
so that if this happens, it doesn't do the recursive fetching.
I think that means we want to change the arguments to
youtube-dl --flat-playlist --no-playlist
so that if this happens
That's a good idea. Although right now in YtdlProcess::Invoke it only accept one PlaylistMode
argument. Maybe we can change it so it always uses --flat-playlist
? Or maybe turn PlaylistMode
into bit masks?
I kind of expanded on it in the notes in #5, but I think it basically just comes down to:
PlaylistMode::SINGLE
: We want a URL/info for a single URL via input plugin, invoke should use --flat-playlist --no-playlist
PlaylistMode::FLAT
: Playlist plugin wants info on a playlist, invoke should use --flat-playlist --yes-playlist
PlaylistMode::FULL
: Playlist plugin wants the full playlist, invoke should just use --yes-playlist
and omit the flat flagThe argument doesn't really need to change, those are still the only 3 request modes that can be made. I don't think FULL
is even used right now, because flat is much faster and the RemoteTagScanner fills in the individual song metadata asynchronously instead. So there really are just the two modes, song or playlist. Full is mainly still there just in case certain extractors would benefit from its use, I figure it could be requested as part of the URL like ytdl://https://whatever.url/#full
or something if really needed. Not sure that it ever will be useful/needed though, so maybe it should just be removed.
Sounds good. I think we can keep FULL, it's not much of the code anyways.
I'll make a PR that adds --flat-playlist
to SINGLE and --yes-playlist
to FLAT.
Makes it so MPD skips the song when a playlist url is added as song url.