Created
September 26, 2011 21:45
-
-
Save alaingilbert/1243498 to your computer and use it in GitHub Desktop.
Remove a large playlist on turntable.fm
This file contains hidden or 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
// Remove the current playlist | |
var files = turntable.playlist.files; | |
var arr = []; | |
for (var i=0, len=files.length; i<len; i++) { | |
arr.push(files[i].fileId); | |
} | |
function remRec(arr) { | |
var fileId = arr.splice(0, 1)[0]; | |
turntable.playlist.removeFile(fileId); | |
if (arr.length > 0) { | |
setTimeout(function () { remRec(arr); }, 1500); | |
} | |
} | |
remRec(arr); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment