parent
d8a1a17f19
commit
22453f3820
|
@ -148,7 +148,7 @@ class ApiController extends Zend_Controller_Action
|
|||
//user clicks play button for track and downloads it.
|
||||
header('Content-Disposition: inline; filename="'.$file_base_name.'"');
|
||||
}
|
||||
if ($ext === 'mp3'){
|
||||
if (strtolower($ext) === 'mp3'){
|
||||
$this->smartReadFile($filepath, 'audio/mpeg');
|
||||
} else {
|
||||
$this->smartReadFile($filepath, 'audio/'.$ext);
|
||||
|
|
|
@ -106,9 +106,9 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
'element_position' => isset($track['position'])?$track['position']:"",
|
||||
);
|
||||
$fileExtension = pathinfo($track['CcFiles']['filepath'], PATHINFO_EXTENSION);
|
||||
if ($fileExtension === 'mp3'){
|
||||
if (strtolower($fileExtension) === 'mp3'){
|
||||
$elementMap['element_mp3'] = $track['CcFiles']['gunid'].'.'.$fileExtension;
|
||||
} else if( $fileExtension === 'ogg') {
|
||||
} else if(strtolower($fileExtension) === 'ogg') {
|
||||
$elementMap['element_oga'] = $track['CcFiles']['gunid'].'.'.$fileExtension;
|
||||
} else {
|
||||
//the media was neither mp3 or ogg
|
||||
|
@ -181,9 +181,9 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
);
|
||||
|
||||
$fileExtension = pathinfo($track['filepath'], PATHINFO_EXTENSION);
|
||||
if ($fileExtension === 'mp3'){
|
||||
if (strtolower($fileExtension) === 'mp3'){
|
||||
$elementMap['element_mp3'] = $track['gunid'].'.'.$fileExtension;
|
||||
} else if( $fileExtension === 'ogg') {
|
||||
} else if(strtolower($fileExtension) === 'ogg') {
|
||||
$elementMap['element_oga'] = $track['gunid'].'.'.$fileExtension;
|
||||
} else {
|
||||
//the media was neither mp3 or ogg
|
||||
|
|
|
@ -166,25 +166,23 @@ function play(p_playlistIndex){
|
|||
*/
|
||||
function playOne(p_audioFileID) {
|
||||
var playlist = new Array();
|
||||
var fileExtensioin = p_audioFileID.split('.').pop();
|
||||
console.log(p_audioFileID);
|
||||
if (fileExtensioin === 'mp3') {
|
||||
var fileExtension = p_audioFileID.split('.').pop();
|
||||
if (fileExtension.toLowerCase() === 'mp3') {
|
||||
media = {title: $('.audioFileTitle').text() !== 'null' ?$('.audioFileTitle').text():"",
|
||||
artist: $('.audioFileArtist').text() !== 'null' ?$('.audioFileArtist').text():"",
|
||||
mp3:"/api/get-media/file/"+p_audioFileID
|
||||
};
|
||||
}else if (fileExtensioin === 'ogg' ) {
|
||||
}else if (fileExtension.toLowerCase() === 'ogg' ) {
|
||||
media = {title: $('.audioFileTitle').text() != 'null' ?$('.audioFileTitle').text():"",
|
||||
artist: $('.audioFileArtist').text() != 'null' ?$('.audioFileArtist').text():"",
|
||||
oga:"/api/get-media/file/"+p_audioFileID
|
||||
};
|
||||
}
|
||||
_playlist_jplayer.option("autoPlay", true);
|
||||
console.log(media);
|
||||
playlist[0] = media;
|
||||
//_playlist_jplayer.setPlaylist(playlist); --if I use this the player will call _init on the setPlaylist and on the ready
|
||||
_playlist_jplayer._initPlaylist(playlist);
|
||||
_playlist_jplayer.play(0);
|
||||
|
||||
window.resizeTo(490, 167);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -212,7 +212,7 @@ class MediaMonitorCommon:
|
|||
|
||||
try:
|
||||
#will be in the format .ext
|
||||
file_ext = os.path.splitext(original_path)[1]
|
||||
file_ext = os.path.splitext(original_path)[1].lower()
|
||||
path_md = ['MDATA_KEY_TITLE', 'MDATA_KEY_CREATOR', 'MDATA_KEY_SOURCE', 'MDATA_KEY_TRACKNUMBER', 'MDATA_KEY_BITRATE']
|
||||
|
||||
md = {}
|
||||
|
|
Loading…
Reference in New Issue