CC-3391: Audio Preview cannot play tracks with commas in their filename

- The content distribution header filename attribute, wasn't properly quoted for inline content. This causes a bug for files with comma names.
- changed the play button in library back to the speaker icon
- removed some dead code preview_player.js
- removed the file name attribute, will need better approch to presenting the user with audio information.
This commit is contained in:
Daniel 2012-03-06 13:50:07 -05:00
parent 348011dbc3
commit 709e117f41
8 changed files with 22 additions and 67 deletions

View file

@ -160,7 +160,7 @@
//add the play function to the library_type td
$(nRow).find('td.library_type').click(function(){
open_audio_preview(aData.track_title, aData.audioFile, aData.id);
open_audio_preview(aData.audioFile, aData.id);
return false;
});
@ -360,7 +360,7 @@
//define a play callback.
if (oItems.play !== undefined) {
callback = function() {
open_audio_preview(data.track_title, data.audioFile, data.id);
open_audio_preview(data.audioFile, data.id);
};
oItems.play.callback = callback;
}
@ -638,13 +638,13 @@
var audio_preview_window = null;
function open_audio_preview(name, filename, index) {
url = 'Playlist/audio-preview-player/name/'+name+'/filename/'+filename+'/index/'+index;
function open_audio_preview(fileID, index) {
url = 'Playlist/audio-preview-player/fileID/'+fileID+'/index/'+index;
//$.post(baseUri+'Playlist/audio-preview-player', {fileName: fileName, cueIn: cueIn, cueOut: cueOut, fadeIn: fadeIn, fadeInFileName: fadeInFileName, fadeOut: fadeOut, fadeOutFileName: fadeOutFileName})
if (audio_preview_window == null || audio_preview_window.closed){
audio_preview_window = window.open(url, 'Audio Player', 'width=400,height=95');
} else if (!audio_preview_window.closed) {
audio_preview_window.play(name, filename);
audio_preview_window.play(fileID);
} else {
console.log("something else : "+baseUrl+url);
}