Closed rmehner closed 11 years ago
Also: We should think about sharing this replace_chars function. Even though we then have interdependencies between the scripts. But I doubt that this is a real problem.
Oh, would also be nice to get a 0.2.1 for that as soon as this is merged. Makes it easier for us to depend on. Thank you!
Wouldn't it be simpler to just convert the position to an integer
set cstate to cstate & ",\"position\": " & (player position as integer)
Would also be a possibility, currently doing that in the app anyway. If you're fine with that, I'll do this.
(Still, replace_chars as shared function would be good, as it is needed in get_track and get_artwork)
See latest commit.
When your current set locale uses "," as decimal delimiter, AppleScript will automatically use this when you convert the number to a string. This will break the JSON parsing for the callback, as "," is invalid when not in quotes.