Created
December 9, 2012 10:01
-
-
Save tylermenezes/4244097 to your computer and use it in GitHub Desktop.
Removes unavailable and preview albums from rdio. This is particularly useful after using the "Sync" feature, since it's useless and generates hundreds of "Unavailable" albums. Scroll to the bottom of your collection first, since it's lazy loaded.
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
(function(){ | |
var i = 0; | |
var count = $('.Album.unavailable,.Album.preview').length; | |
console.log('Found ' + count + ' albums to remove'); | |
var timeout = 0; | |
$('.Album.unavailable,.Album.preview').each(function(){ | |
var instance_i = i++; | |
var album = $(this); | |
album.trigger('mouseover').mouseenter(); | |
album.find('a,div,span,image').trigger('mouseover').mouseenter(); | |
setTimeout(function(){ | |
var album_menu = album.find('.ActionMenu'); | |
album_menu.click(); | |
setTimeout(function(){ | |
$('.Menu').each(function(){ | |
var menu = $(this); | |
if (menu.css('top').substring(0,1) != '-' && menu.find('.delete').length > 0) { | |
console.log("removing " + album.find('.album_title').text() + '(' + instance_i + '/' + count + ')'); | |
var delete_button = menu.find('.delete'); | |
delete_button.click(); | |
setTimeout(function(){ | |
$('#header').click(); | |
}, 300); | |
} | |
}); | |
}, 500); | |
}, timeout); | |
timeout += 2500; | |
}); | |
})(); |
This is exactly what I need! Anyone have a fix?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just a heads up that this doesn't work any more :(