Skip to content

Commit

Permalink
OSX version now includes Starring, Show in Spotify, and external brow…
Browse files Browse the repository at this point in the history
…ser links. closes #20
  • Loading branch information
pdaddyo committed Dec 22, 2014
1 parent c28843e commit 88c3f53
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/client-node-webkit/osx/osx.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@
global.spotifyUsername = user;
spotify.login(user, pass, false, false);
},
getUsername: function () {
return global.spotifyUsername;
},
getVersion: function () {
return '0.9-osx';
return clientVersion;
},
playTrack: function (trackId, position) {
setTimeout(function () {
Expand All @@ -60,8 +63,20 @@
},
pauseTrack: function () {
spotify.player.pause();
}
},
starTrack: function (trackId){
setTimeout(function () {
var track = spotify.createFromLink('spotify:track:' + trackId);
track.starred = true;
}, 1);
},
openUrl: function (url){
gui.Shell.openExternal(url);

},
openInSpotify: function(trackId){
gui.Shell.openExternal("spotify:track:"+trackId+"?action=browse");
}

};

Expand Down

0 comments on commit 88c3f53

Please sign in to comment.