Commit a7dd4601 authored by Fjen Undso's avatar Fjen Undso
Browse files

fix paging

parent 966fc7ff
......@@ -94,16 +94,16 @@ class YouTubeLibraryProvider(backend.LibraryProvider):
query = {
'part': 'id,snippet',
'fields': 'nextPageToken,items(snippet(resourceId(videoId)))',
'maxResults': maxresults,
'maxResults': 50,
'playlistId': id,
'key': yt_key,
'pageToken': page,
results = session.get(yt_api_endpoint + 'playlistItems',
for res in results:
for res in results['items']:
page = results['nextPageToken'] or None
page = results.get('nextPageToken') or None
return self._get_tracks(video_ids)
def _get_search(self, query, maxresults=20):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment