Merge branch 'master' of dev.sourcefabric.org:campcaster
This commit is contained in:
commit
27293c6b8f
12 changed files with 153 additions and 44 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue