audius icon indicating copy to clipboard operation
audius copied to clipboard

load complete youtube playlists

Open select opened this issue 7 years ago • 3 comments

for now only the first 50 items are added

select avatar Aug 03 '18 10:08 select

I agree, this is an heavy limitation, why only load the first 50 tracks?

illtellyoulater avatar Aug 03 '21 17:08 illtellyoulater

That was the easiest to implement, did not have to deal with pagination this way

select avatar Aug 04 '21 21:08 select

@select I implemented pagination in another project of mine, it's really easy to do: when you receive the first 50 results they also come with a token for obtaining the next results (when available). So you check for presence of this token, and if it's there, then at the end of your function for requesting playlist videos, you call the function again recursively, this time providing the token for the next page of results. This way the function runs until it obtains all playlist videos, and will stop as soon as the token is no longer received.

illtellyoulater avatar Aug 06 '21 01:08 illtellyoulater