javascript - Youtube API V3 - Missing items in playlist when requesting them with playlistItems.list -


i have been trying items in this playlist, has 64 items in it, javascript.

this function have been using response , display items in response:

function getplaylistitems( playlistid, maxresults, pagetoken ) {      var requestoptions = {         playlistid: playlistid,         part: 'snippet',         maxresults: maxresults,         fields: "items,nextpagetoken"     };      if ( pagetoken ) {         requestoptions.pagetoken = pagetoken;     }      var request = gapi.client.youtube.playlistitems.list( requestoptions );     request.execute( function( response ) {          var playlistitems = response.items;          console.log( playlistitems.length, playlistitems );         $.each( playlistitems, function( index, item ) {             displayresult( item.snippet.title );         } );          if ( response.nextpagetoken ) {             console.log( response.nextpagetoken );             getplaylistitems( playlistid, maxresults, response.nextpagetoken );         }     } );     displayresult( "---" ); } 

if maxresults = 25 first iteration returns videos 01-25, expect.

but second iteration goes 31-55. third 1 has no items in it. missing 26-30 , 56-64.

with maxresults = 10 missing 31-40.  maxresults = 20 missing 41-60. maxresults = 30 missing 31-40.  

(this not code ^^ stackoverflow didn't allow me post otherwise :s )

is there doing wrong or not getting correct nextpagetoken?

edit: fixed now.

i think it's bug. when retrieve playlist (plsjnfrnoxjx_hlx3ja4nggxmym1pj26rb), using api version 3, first page of 50 items.

see also: retrieve youtube playlist wrong when playlist items count on 100

update: see bug report: https://code.google.com/p/gdata-issues/issues/detail?id=6162&q=label%3aapi-youtube&colspec=api%20id%20type%20status%20priority%20stars%20summary


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -