Skip to content

Instantly share code, notes, and snippets.

@chrisinajar
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisinajar/892885fac3af90819bb6 to your computer and use it in GitHub Desktop.
Save chrisinajar/892885fac3af90819bb6 to your computer and use it in GitHub Desktop.
queueSoundtrackSong for soundtrack.io
function queueSoundtrackSong(index) {
var trackData = $.extend({}, TralbumData, TralbumData.trackinfo[index || 0]);
$.ajax({url: "//soundtrack.io/playlist",
type: 'post',
xhrFields: {
withCredentials: true
},
data: {
source: 'bandcamp',
id: {
artist: TralbumData.artist,
title: trackData.title,
id: trackData.id,
url: trackData.file['mp3-128'],
duration: trackData.duration,
thumbnail: TralbumData.artThumbURL,
artwork_url: TralbumData.artFullsizeUrl
}
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment