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

Get total number of items in playlist #12836

Closed
Rudloff opened this issue Apr 25, 2017 · 2 comments
Closed

Get total number of items in playlist #12836

Rudloff opened this issue Apr 25, 2017 · 2 comments

Comments

@Rudloff
Copy link
Contributor

@Rudloff Rudloff commented Apr 25, 2017

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.04.17. 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 2017.04.17

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

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

Description of your issue, suggested solution and other information

I'm trying to paginate playlists.
But when using --dump-single-json --playlist-end 5 on a long playlist, I don't have a way to know from the JSON if there are more videos in the playlist.
It would be useful to get either:

  • The total number of videos in the playlist.
  • A boolean that indicates if there are videos coming next in the playlist.
@Tithen-Firion
Copy link
Contributor

@Tithen-Firion Tithen-Firion commented Apr 26, 2017

I doubt this will be added. You are generating unnecessary traffic by loading playlist URL each time you download 5 more videos.

Use --flat-playlist --dump-single-json, this way you load playlist URL only once and you can easily count all the videos.

@Rudloff
Copy link
Contributor Author

@Rudloff Rudloff commented Apr 26, 2017

Hum, you're right. I guess I can use --flat-playlist.
I thought it was gonna be slow for large playlists but turns out it's not.

@Rudloff Rudloff closed this Apr 26, 2017
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.