Created
September 13, 2012 17:15
-
-
Save MeoMix/3715911 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var onReady = function(){ | |
var waitForPlaylistAndPort = setInterval(function(){ | |
playlist = playlists.getSelectedPlaylist(); | |
if(playlist && port){ | |
clearInterval(waitForPlaylistAndPort); | |
sendUpdate(); | |
//If there is a song to cue might as well have it ready to go. | |
if (playlist.songCount() > 0) { | |
loadSongById(playlist.getSongs()[0].id); | |
playlist.addSongToHistory(playlist.getSongs()[0]); | |
} | |
} | |
}, 200); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment