Last active
August 29, 2015 14:14
-
-
Save chrisinajar/892885fac3af90819bb6 to your computer and use it in GitHub Desktop.
queueSoundtrackSong for soundtrack.io
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 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