Closed rmehner closed 11 years ago
Two things:
Merged it.
About the suggested refactoring: I had the same idea last weekend, and did a similar refactoring in this branch: https://github.com/andrehaveman/spotify-node-applescript/blob/separate_applescript_files/lib/spotify-node-applescript.js. Please let me know what you think about it.
Just looked at your refactoring. This is nearly the same as I had in mind, so +1 on that.
Things I'd have done different:
Would be good to have some new releases then, makes it easier to depend on it, as NPM is having some issues with Git dependencies
Anything I can help with?
I wanted the choice for string or file in one place (the scripts object). That's why I chose to incorporate file execution in the execScript function.
I also replaced the transformer function with an extra param for the execScript function and use util.transform instead.
I will release it when I have merged the last open pull request (in a few days).
Everything very good, thank you for your work and as said: let me know when I can help.
On a second note: I'm happy to provide the tests for the mute/unmute thing if that's a blocker. I just can't fork his repo at the moment, because that would eliminate my fork on which spotify-remote depends on.
Thanks, but already wrote the test yersterday evening :). I also did a small change in getState. The position is now returned as number instead of string. I will release a new version this evening.
track_id is now part of the JSON of getState. This commit also extracts getState out to a seperate file, making maintainance eaiser.