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

Honor sort parameter in youtube channel video listing URLs #20316

Open
anohren opened this issue Mar 11, 2019 · 3 comments
Open

Honor sort parameter in youtube channel video listing URLs #20316

anohren opened this issue Mar 11, 2019 · 3 comments

Comments

@anohren
Copy link

@anohren anohren commented Mar 11, 2019

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2019.03.09. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2019.03.09

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


Description of your issue, suggested solution and other information

When listing a Youtube channel's entire video catalog using the "Videos" tab, there's the option to sort them by date in descending (newest first) or ascending (oldest first) order. This is reflected in the URL as the sort= parameter, e.g. sort=da which I assume means "date ascending". When using a URL with this parameter in youtube-dl, the parameter seems to be ignored.

Unlike #2405 this request doesn't ask for an option to sort the results explicitly, just to honor the parameter when present in the URL, whether optionally or by default.

The benefit for users would be that if they're using youtube-dl indirectly -- e.g. built into a media player -- and are unable to directly pass options to it, they can still control the ordering of the result by way of the URL and web UI. The results reflect the URL more accurately.

How I tested it:

  • Go to complete video listing of a youtube channel
  • Sort videos by oldest first
  • Copy the url
  • List with youtube-dl --get-title "https://www.youtube.com/user/msadaghd/videos?sort=da&view=0&flow=grid"

Expected behavior

The oldest video is listed first.

Actual behavior

The most recent video is listed first.

Example URL

ElectroBOOM sorted by date in ascending order:

https://www.youtube.com/user/msadaghd/videos?sort=da&view=0&flow=grid

@ealgase
Copy link
Contributor

@ealgase ealgase commented Mar 11, 2019

The current way the channel extractor works is it finds the channel's playlist (ID is just the channel ID with UC replaced with UU). This would require significant modification to the channel extractor.

@anohren
Copy link
Author

@anohren anohren commented Mar 11, 2019

Thanks for the insights and clarification of potential obstacles. I'm afraid I'm not familiar with channel IDs or where they appear so I don't know how to use that to test anything out at the moment.

I was hoping that there would be some way to enable the -- not too uncommon, in my opinion -- use case of listing all channel videos chronologically without having to conditionally set an option like --playlist-reverse depending on whether the URL points to a youtube channel or not. Sounds like it's not worth the effort though.

@ealgase
Copy link
Contributor

@ealgase ealgase commented Mar 12, 2019

Your use case is definitely useful, I was just mentioning the reason why it's not easy to implement.

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.