Merge branch 'master' of dev.sourcefabric.org:campcaster
This commit is contained in:
commit
27293c6b8f
12 changed files with 153 additions and 44 deletions
|
@ -60,8 +60,8 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
|||
$view->headScript()->appendFile('/js/libs/jquery.stickyPanel.js','text/javascript');
|
||||
|
||||
//scripts for now playing bar
|
||||
$this->view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript');
|
||||
//$this->view->headScript()->appendFile('/js/playlist/helperfunctions.js','text/javascript');
|
||||
//$this->view->headScript()->appendFile('/js/playlist/playlist.js','text/javascript');
|
||||
|
||||
$view->headScript()->appendFile('/js/airtime/common/common.js','text/javascript');
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
$ajaxContext->addActionContext('contents', 'json')
|
||||
->addActionContext('delete', 'json')
|
||||
->addActionContext('context-menu', 'json')
|
||||
->addActionContext('get-file-meta-data', 'html')
|
||||
->initContext();
|
||||
|
||||
$this->pl_sess = new Zend_Session_Namespace(UI_PLAYLIST_SESSNAME);
|
||||
|
@ -24,9 +25,10 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
public function indexAction()
|
||||
{
|
||||
$this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/contextmenu/jjmenu.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/jplayer/jquery.jplayer.min.js');
|
||||
$this->view->headScript()->appendFile('/js/datatables/js/jquery.dataTables.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/qtip/jquery.qtip-1.0.0.min.js','text/javascript');
|
||||
$this->view->headScript()->appendFile('/js/airtime/library/library.js','text/javascript');
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/css/media_library.css');
|
||||
|
@ -90,7 +92,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
public function deleteAction()
|
||||
{
|
||||
$id = $this->_getParam('id');
|
||||
|
||||
|
||||
if (!is_null($id)) {
|
||||
$file = StoredFile::Recall($id);
|
||||
|
||||
|
@ -116,7 +118,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
public function contentsAction()
|
||||
{
|
||||
$post = $this->getRequest()->getPost();
|
||||
$post = $this->getRequest()->getPost();
|
||||
$datatables = StoredFile::searchFilesForPlaylistBuilder($post);
|
||||
|
||||
die(json_encode($datatables));
|
||||
|
@ -144,6 +146,27 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
$this->view->form = $form;
|
||||
}
|
||||
|
||||
public function getFileMetaDataAction()
|
||||
{
|
||||
$id = $this->_getParam('id');
|
||||
$type = $this->_getParam('type');
|
||||
|
||||
if($type == "au") {
|
||||
$file = StoredFile::Recall($id);
|
||||
$this->view->type = $type;
|
||||
$this->view->md = $file->md;
|
||||
}
|
||||
else if($type == "pl") {
|
||||
$file = Playlist::Recall($id);
|
||||
$this->view->type = $type;
|
||||
$this->view->md = $file->getAllPLMetaData();
|
||||
$this->view->contents = $file->getContents();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -162,3 +185,5 @@ class LibraryController extends Zend_Controller_Action
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -166,13 +166,13 @@ class Playlist {
|
|||
return FALSE;
|
||||
|
||||
$storedPlaylist = new Playlist();
|
||||
$storedPlaylist->id = $pl->getDbId();
|
||||
$storedPlaylist->id = $id;
|
||||
$storedPlaylist->name = $pl->getDbName();
|
||||
$storedPlaylist->state = $pl->getDbState();
|
||||
$storedPlaylist->currentlyaccessing = $pl->getDbCurrentlyaccessing();
|
||||
$storedPlaylist->editedby = $pl->getDbEditedby();
|
||||
$storedPlaylist->mtime = $pl->getDbMtime();
|
||||
|
||||
|
||||
return $storedPlaylist;
|
||||
}
|
||||
|
||||
|
@ -461,7 +461,7 @@ class Playlist {
|
|||
}
|
||||
|
||||
$metadata = $media->getMetadata();
|
||||
$length = $metadata["length"];
|
||||
$length = $metadata["dcterms:extent"];
|
||||
|
||||
if (!is_null($p_clipLength)) {
|
||||
$length = $p_clipLength;
|
||||
|
@ -777,6 +777,25 @@ class Playlist {
|
|||
|
||||
}
|
||||
|
||||
public function getAllPLMetaData()
|
||||
{
|
||||
$categories = $this->categories;
|
||||
$row = CcPlaylistQuery::create()->findPK($this->id);
|
||||
$md = array();
|
||||
|
||||
foreach($categories as $key => $val) {
|
||||
if($val === 'length') {
|
||||
$md[$key] = $this->getLength();
|
||||
continue;
|
||||
}
|
||||
|
||||
$method = 'get' . $val;
|
||||
$md[$key] = $row->$method();
|
||||
}
|
||||
|
||||
return $md;
|
||||
}
|
||||
|
||||
public function getPLMetaData($category)
|
||||
{
|
||||
$cat = $this->categories[$category];
|
||||
|
|
|
@ -492,9 +492,9 @@ class StoredFile {
|
|||
$escapedValue = pg_escape_string($this->gunid);
|
||||
$sql = "SELECT * FROM ".$CC_CONFIG["filesTable"]
|
||||
." WHERE gunid='$escapedValue'";
|
||||
//var_dump($sql);
|
||||
|
||||
$this->md = $CC_DBC->getRow($sql);
|
||||
//var_dump($this->md);
|
||||
|
||||
if (PEAR::isError($this->md)) {
|
||||
$error = $this->md;
|
||||
$this->md = null;
|
||||
|
@ -511,10 +511,9 @@ class StoredFile {
|
|||
$compatibilityData[$xmlName] = $value;
|
||||
}
|
||||
}
|
||||
//var_dump($compatibilityData);
|
||||
$this->md = array_merge($this->md, $compatibilityData);
|
||||
//var_dump($this->md);
|
||||
//$_SESSION["debug"] = $this->md;
|
||||
|
||||
//$this->md = array_merge($this->md, $compatibilityData);
|
||||
$this->md = $compatibilityData;
|
||||
}
|
||||
|
||||
public function setFormat($p_value)
|
||||
|
@ -707,7 +706,7 @@ class StoredFile {
|
|||
$sql = "SELECT *"
|
||||
." FROM ".$CC_CONFIG['filesTable']
|
||||
." WHERE $cond";
|
||||
//echo $sql;
|
||||
|
||||
$row = $CC_DBC->getRow($sql);
|
||||
if (PEAR::isError($row) || is_null($row)) {
|
||||
return $row;
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<?php echo $this->partialLoop('library/libraryTablePartial.phtml', $this->files) ?>
|
|
@ -1 +0,0 @@
|
|||
<li><a href="<?php echo $this->action ?>"><?php echo $this->text ?></a></li>
|
|
@ -0,0 +1,47 @@
|
|||
<?php if($this->type == "au") : ?>
|
||||
<div><span>Title:</span><span><?php echo ($this->md["dc:title"]);?></span></div>
|
||||
<div><span>Artist:</span><span><?php echo ($this->md["dc:creator"]);?></span></div>
|
||||
<div><span>Album:</span><span><?php echo ($this->md["dc:source"]);?></span></div>
|
||||
<div><span>Track:</span><span><?php echo ($this->md["ls:track_num"]);?></span></div>
|
||||
<div><span>Length:</span><span><?php echo ($this->md["dcterms:extent"]);?></span></div>
|
||||
<div><span>Genre:</span><span><?php echo ($this->md["dc:type"]);?></span></div>
|
||||
<div><span>Sample Rate:</span><span><?php echo ($this->md["ls:samplerate"]);?></span></div>
|
||||
<div><span>Bit Rate:</span><span><?php echo ($this->md["ls:bitrate"]);?></span></div>
|
||||
<div><span>Channels:</span><span><?php echo ($this->md["ls:channels"]);?></span></div>
|
||||
|
||||
<div><span>Year:</span><span><?php echo ($this->md["ls:year"]);?></span></div>
|
||||
<div><span>Label:</span><span><?php echo ($this->md["dc:publisher"]);?></span></div>
|
||||
<div><span>BPM:</span><span><?php echo ($this->md["ls:bpm"]);?></span></div>
|
||||
<div><span>Channels:</span><span><?php echo ($this->md["ls:channels"]);?></span></div>
|
||||
<div><span>Orchestra:</span><span><?php echo ($this->md["ls:orchestra"]);?></span></div>
|
||||
<div><span>Conductor:</span><span><?php echo ($this->md["ls:conductor"]);?></span></div>
|
||||
<div><span>Copyright:</span><span><?php echo ($this->md["dc:rights"]);?></span></div>
|
||||
<div><span>Catalog Number:</span><span><?php echo ($this->md["ls:catalognumber"]);?></span></div>
|
||||
<div><span>Isrc Number:</span><span><?php echo ($this->md["ls:isrcnumber"]);?></span></div>
|
||||
|
||||
<div><span>Report Datetime:</span><span><?php echo ($this->md["dcterms:temporal"]);?></span></div>
|
||||
<div><span>Report Location:</span><span><?php echo ($this->md["dcterms:spatial"]);?></span></div>
|
||||
<div><span>Report Organization:</span><span><?php echo ($this->md["dcterms:entity"]);?></span></div>
|
||||
<div><span>Subject:</span><span><?php echo ($this->md["dc:subject"]);?></span></div>
|
||||
<div><span>Contributor:</span><span><?php echo ($this->md["dc:contributor"]);?></span></div>
|
||||
|
||||
<div><span>Language:</span><span><?php echo ($this->md["dc:language"]);?></span></div>
|
||||
<div><span>Comments:</span><span><?php echo ($this->md["dc:description"]);?></span></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if($this->type == "pl") : ?>
|
||||
<div><span>Name:</span><span><?php echo ($this->md["dc:title"]);?></span></div>
|
||||
<div><span>Creator:</span><span><?php echo ($this->md["dc:creator"]);?></span></div>
|
||||
<div><span>Length:</span><span><?php echo ($this->md["dcterms:extent"]);?></span></div>
|
||||
<div><span>Description:</span><span><?php echo ($this->md["dc:description"]);?></span></div>
|
||||
<div><span>Contents: </span>
|
||||
<?php foreach($this->contents as $row) : ?>
|
||||
<div>
|
||||
<span><?php echo $row["CcFiles"]["track_title"] ?></span>
|
||||
<span><?php echo $row["CcFiles"]["artist_name"] ?></span>
|
||||
<span><?php echo $row["CcFiles"]["album_title"] ?></span>
|
||||
<span><?php echo $row["cliplength"] ?></span>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
|
@ -1,2 +0,0 @@
|
|||
<label for="quick_search">Search:</label>
|
||||
<input id="quick_search" name="quick_search" type="text" value = "<?php echo $this->qs_value ?>"></input>
|
Loading…
Add table
Add a link
Reference in a new issue