CC-1665: Scheduled stream rebroadcasting and recording
-playlists load contents now correctly identify tracks vs streams
This commit is contained in:
parent
cf2f96ecf1
commit
8b2facaa96
15 changed files with 283 additions and 105 deletions
|
@ -101,16 +101,16 @@ class AudiopreviewController extends Zend_Controller_Action
|
|||
|
||||
foreach ( $pl->getContents(true) as $track ) {
|
||||
|
||||
$elementMap = array( 'element_title' => isset($track['CcFiles']['track_title'])?$track['CcFiles']['track_title']:"",
|
||||
'element_artist' => isset($track['CcFiles']['artist_name'])?$track['CcFiles']['artist_name']:"",
|
||||
$elementMap = array( 'element_title' => isset($track['track_title'])?$track['track_title']:"",
|
||||
'element_artist' => isset($track['artist_name'])?$track['artist_name']:"",
|
||||
'element_id' => isset($track['id'])?$track['id']:"",
|
||||
'element_position' => isset($track['position'])?$track['position']:"",
|
||||
);
|
||||
$fileExtension = pathinfo($track['CcFiles']['filepath'], PATHINFO_EXTENSION);
|
||||
$fileExtension = pathinfo($track['filepath'], PATHINFO_EXTENSION);
|
||||
if (strtolower($fileExtension) === 'mp3') {
|
||||
$elementMap['element_mp3'] = $track['CcFiles']['gunid'].'.'.$fileExtension;
|
||||
$elementMap['element_mp3'] = $track['gunid'].'.'.$fileExtension;
|
||||
} elseif (strtolower($fileExtension) === 'ogg') {
|
||||
$elementMap['element_oga'] = $track['CcFiles']['gunid'].'.'.$fileExtension;
|
||||
$elementMap['element_oga'] = $track['gunid'].'.'.$fileExtension;
|
||||
} else {
|
||||
//the media was neither mp3 or ogg
|
||||
}
|
||||
|
|
|
@ -293,8 +293,8 @@ class PlaylistController extends Zend_Controller_Action
|
|||
|
||||
public function addItemsAction()
|
||||
{
|
||||
$ids = $this->_getParam('ids', array());
|
||||
$ids = (!is_array($ids)) ? array($ids) : $ids;
|
||||
$aItems = $this->_getParam('aItems', array());
|
||||
$aItems = (!is_array($aItems)) ? array($aItems) : $aItems;
|
||||
$afterItem = $this->_getParam('afterItem', null);
|
||||
$addType = $this->_getParam('type', 'after');
|
||||
$obj_type = $this->_getParam('obj_type');
|
||||
|
@ -307,17 +307,13 @@ class PlaylistController extends Zend_Controller_Action
|
|||
} else {
|
||||
throw new PlaylistDyanmicException;
|
||||
}
|
||||
}
|
||||
catch (PlaylistOutDatedException $e) {
|
||||
$this->playlistOutdated($e);
|
||||
}
|
||||
catch (PlaylistNotFoundException $e) {
|
||||
$this->playlistNotFound($obj_type);
|
||||
}
|
||||
catch (PlaylistDyanmicException $e) {
|
||||
$this->playlistDynamic($obj);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
} catch (PlaylistOutDatedException $e) {
|
||||
$this->playlistOutdated($pl, $e);
|
||||
} catch (PlaylistNotFoundException $e) {
|
||||
$this->playlistNotFound();
|
||||
} catch (PlaylistDyanmicException $e) {
|
||||
$this->playlistDynamic($pl);
|
||||
} catch (Exception $e) {
|
||||
$this->playlistUnknownError($e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue