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

Add playlist videos #35

Merged
merged 6 commits into from Jan 5, 2017
Merged

Add playlist videos #35

merged 6 commits into from Jan 5, 2017

Conversation

claudiob
Copy link
Owner

@claudiob claudiob commented Jan 5, 2017

No description provided.

Previously we would *stop* the iteration if the last page did not contain
enough items.

However, YouTube sometimes returns a `nextPageToken` and we have to check
the next page to ensure it's empty. So we will.

Additionally, every time we start looping again, we need to clear out the
old pageToken so we always start back from the first page.
This is to match YouTube API documentation.
In particular, YouTube sometimes returns *more* than 500 videos but
all the subsequent pages are messed up, are empty or contain duplicate
videos.
The quota is not impacted. `limit` should only affect the total of
items returned, not how many we fetch per page.
@claudiob claudiob merged commit 5ace72d into master Jan 5, 2017
@claudiob claudiob deleted the add-playlist-videos branch January 5, 2017 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant