Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] --playlist-site-order #15299

Open
glenn-slayden opened this issue Jan 17, 2018 · 2 comments
Open

[Request] --playlist-site-order #15299

glenn-slayden opened this issue Jan 17, 2018 · 2 comments

Comments

@glenn-slayden
Copy link
Contributor

@glenn-slayden glenn-slayden commented Jan 17, 2018

Feature request to add a boolean command-line switch --playlist-site-order (or other preferred name, such as perhaps --playlist-forward for symmetry with --playlist-reverse) which would explicitly restore the default YoutubeDL behavior of downloading videos in sequential order, i.e., the unmodified order as reported by the provider.

This would allow the user to restore the default behavior in specific cases where the --playlist-reverse or --playlist-random switch is specified in a lower-priority configuration location. In other words, to override those options if specified elsewhere.

@glenn-slayden
Copy link
Contributor Author

@glenn-slayden glenn-slayden commented Jan 17, 2018

A possible improvement on the suggestion would be to consolidate the multiple switches into a single multi-valued command line option. Since there are three mutually-exclusive options for playlist sequence--default (forward), reverse, and random--which (according to the original request above) would each need an explicit form, the capabilities may have outgrown the current scheme of boolean switches.

Furthermore, in such a new scheme, a better name for the multi-valued command line option might actually be --download-order. So we would have:

--download-order default
--download-order forward       # (optional) convenience alias, same as 'default'
--download-order reverse
--download-order random

Riffing now, the re-imagined feature could then also offer more advanced modes (future work). At this point, the suggestions should be considered very rough sketches:

--download-order smallest     # sorted by download size, small to large
--download-order largest      # opposite of the previous, largest file to smallest
--download-order shortest     # sorted by video duration, short to long
--download-order longest      # duration, longest to shortest

#  etc..? i.e., alternate odd-then-even (vs. even-then-odd), ...

Unfortunately this modified proposal would entail a breaking change vs. existing behavior, unless those legacy switches are preserved as well. But doing the latter would probably complicate things to the demise of this whole enterprise, so it might be best to just stick with my original proposal, above.

@Pharap
Copy link

@Pharap Pharap commented Dec 3, 2019

I'm not sure what the merit of downloading videos in random order would be,
but I can see a good argument for downloading in reverse order.

Sometimes Youtube playlists are created in reverse order for some reason, so downloading in reverse would rectify that mistake and allow end users to download in the 'correct' order as it were (thus allowing the user to watch videos while the rest download).

I'd like to add that the more complex approach of --download-order <order> is also more flexible in that it allows new orders to be introduced with relative ease, and is perhaps easier to script.

Perhaps it would be best to support --download-order, but to start with only support default, forward and reverse, thus allowing other modes to be considered as part of a separate future issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.