This JS worked fine with Firefox but didn't quite worked with Chrome (skipped most of the tracks).
1)
Go to non-downloaded tracks page https://www.flipkart.com/account/mp3library?filter=not-downloaded&sort=recency
2) For Firefox (
Tools -> Web Developer -> Web Console), or you can use the console from Firebug addon, paste the following JavaScript snippet & press enter.
Code:
jQuery('.album-click').trigger('click');
var time = 500;
jQuery('.dwnld-icn-enabled').each( function() {
var el = this;
setTimeout( function() {
jQuery('body').animate( { scrollTop: jQuery(el).offset().top }, 1000 );
jQuery(el).trigger('click');
}, time+=800 );
});
It will take roughly 0.8-1 second per track to send the download request to the server. Depending on the number of tracks (visible on that particular page), you will soon get a download pop-up of last song from that list. Cancel it & wait for few more seconds, until all the pending requests has been completed.
It should be able to mark 90% of the tracks in one go (about 150-200 in 2-3 minutes), it may vary if the server is under load & doesn't respond back for few requests. On slower computer browser may become un-responsive for those 2-3 minutes. If you have slower system, you can comment out first [
jQuery('.album-click').trigger('click');] & sixth line [
jQuery('body').animate( { scrollTop: jQuery(el).offset().top }, 1000 );] of the code by adding "
//" (without quotes) in front on those 2 lines or you may even
remove those 2 lines. That piece of code is there just for visualization purpose, i.e. it will expand album track list & scroll the page along with the clicks. It doesn't have any other function in the code.
Again, it will only mark those tracks which are listed/visible on that page, which can be changed/expanded by clicking "
Show more results" present on the bottom of the list.
3) Note down the number of tracks before & after, to see if it works or not.
Repeat the process for left out tracks by reloading the page & running the script again.
@
Wiz