xissy / node-grooveshark-streaming

A node.js module for getting a music streaming url from Grooveshark without any API authentication.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Break each step out into functions

yocontra opened this issue · comments

Would help this be more modular. Your tokens expire after a certain point so re-running only the needed part to refresh it would be easier than doing the whole process

@contra Thank you for your concern. Actually that's what I tried to do.

I've used this library at server-side, that means a lot of users can access this library concurrently.
At that time, if we try to re-use a session then the conflict can be occurred because of node.js' event driven architecture.

To avoid this conflict, I had to implement some data structures like a session map so I decided to skip optimizing to maintain its simplicity.

Anyway this is what I experienced. But if you have any other awesome ideas then please let me know. Surely always welcome your pull requests.