From 88c3f532b257f1f3946603cfca300a2c501c0d69 Mon Sep 17 00:00:00 2001 From: pdaddyo Date: Mon, 22 Dec 2014 23:50:10 +0000 Subject: [PATCH] OSX version now includes Starring, Show in Spotify, and external browser links. closes #20 --- src/client-node-webkit/osx/osx.html | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/client-node-webkit/osx/osx.html b/src/client-node-webkit/osx/osx.html index 208919e..e4bf91c 100644 --- a/src/client-node-webkit/osx/osx.html +++ b/src/client-node-webkit/osx/osx.html @@ -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 () { @@ -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"); + } };