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

Count errors out at values >20. #2

Open
jmduke opened this issue Nov 22, 2013 · 0 comments
Open

Count errors out at values >20. #2

jmduke opened this issue Nov 22, 2013 · 0 comments

Comments

@jmduke
Copy link
Contributor

jmduke commented Nov 22, 2013

Since hypem has built-in pagination and you currently only grab the first page:

http://hypem.com/playlist/loved/" + username + "/json/1/data.js

Obviously any values past 20 are ignored (and an uncaught TypeError is thrown when the loop tries to access data[20].title.)

I'd say there are probably two routes here:

  • Refactor the main this.each() call a little bit to iterate over all the necessary json files.
  • Wrap the list.append() method in a try/catch so we can give a verbose error, at the very least. (This would also be helpful in instances where the getJSON call is damaged or unsuccessful, I'd imagine.)

More than willing to submit a PR for this -- just wanted to get your thoughts :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant