TimeForANinja / node-ytpl

Anonymous YouTube playlist resolver.
MIT License
203 stars 48 forks source link

(wip) Error: continueReq only allowed for paged requests #97

Closed patrickkfkan closed 3 years ago

patrickkfkan commented 3 years ago

Hello,

Just did a bit of testing with the wip branch (sorry, couldn't wait).. I got an error with continueReq():

Error: continueReq only allowed for paged requests

I just fed the continuation object returned by ytpl to continueReq(), like the example in the Readme.

Looking at the line that throws this error:

if (!isNaN(args[3].limit)) throw new Error('continueReq only allowed for paged requests');

But then, args[3].limit (i.e. opts.limit) is always Infinity when continuation is returned. That means !isNaN(args[3].limit) will always be true (hence the error)?

I haven't tested ytsr yet, but glancing at the code I suppose it's going to be the same ;) ?

Thanks, Patrick

TimeForANinja commented 3 years ago

nice spotting i'm happy with every error found before i merge to master 👍🏻 fix on it's way

TimeForANinja commented 3 years ago

fixed in https://github.com/TimeForANinja/node-ytpl/commit/55697d56d2c94336b16ec90c016e8270ed845e2a and https://github.com/TimeForANinja/node-ytsr/commit/1033011aaba31d83b85bab1c7c99fa2b56e87c69