You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it would approve everything in the suggestions, then remove from the end of queue.
var suggestions = GS.getCurrentBroadcast().attributes.suggestions.models;
var number = suggestions.length;
suggestions.forEach(function(suggestion) {
GS.Services.SWF.approveSuggestedSongForBroadcast(suggestion.attributes.SongID)
});
var songs = GS.Services.SWF.getCurrentQueue().songs;
if (isNaN(number) || number < 1)
number = 0;
while (--number >= 0)
{
if (songs.length - 1 - number >= 0)
{
var id = songs[songs.length - 1 - number].queueSongID;
if (id != GS.Services.SWF.getCurrentQueue().activeSong.queueSongID)
allID.push(id);
}
}
if (allID.length > 0)
{
GS.Services.SWF.removeSongs(allID);
}
The text was updated successfully, but these errors were encountered:
had to alter slightly... apparently its not instant. who knew..
var suggestions = GS.getCurrentBroadcast().attributes.suggestions.models;
var number = suggestions.length;
var allID = [];
suggestions.forEach(function(suggestion) {
GS.Services.SWF.approveSuggestedSongForBroadcast(suggestion.attributes.SongID)
});
setTimeout(function(){
var songs = GS.Services.SWF.getCurrentQueue().songs;
while (--number >= 0)
{
if (songs.length - 1 - number >= 0)
{
var id = songs[songs.length - 1 - number].queueSongID;
allID.push(id);
}
}
GS.Services.SWF.removeSongs(allID);
}, 5000);
it would approve everything in the suggestions, then remove from the end of queue.
The text was updated successfully, but these errors were encountered: