-
-
Save Avinash-Bhat/a39446e5a9977bc6160e25fa70246b65 to your computer and use it in GitHub Desktop.
download mp3's from bandcamp
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
var commands = []; | |
commands.push('mkdir "' + TralbumData.current.title + '"'); | |
commands.push('cd "' + TralbumData.current.title + '"'); | |
TralbumData.trackinfo.forEach(function (track, index) { | |
if (track.file) { | |
var href = track.file['mp3-128']; | |
if (href.startsWith("//")) { | |
href = "https:" + href | |
} | |
commands.push('curl -o "' + track.title + '.mp3" -L "' + href + '"&'); | |
} | |
}); | |
commands.push('cd ../'); | |
console.log(commands.join('\n')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment