Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
8fdf7d9387
2 changed files with 8 additions and 3 deletions
|
@ -269,7 +269,12 @@ class Application_Model_ShowBuilder
|
||||||
|
|
||||||
$cue_out = Application_Common_DateHelper::calculateLengthInSeconds($p_item['cue_out']);
|
$cue_out = Application_Common_DateHelper::calculateLengthInSeconds($p_item['cue_out']);
|
||||||
$cue_in = Application_Common_DateHelper::calculateLengthInSeconds($p_item['cue_in']);
|
$cue_in = Application_Common_DateHelper::calculateLengthInSeconds($p_item['cue_in']);
|
||||||
|
|
||||||
|
if ($cue_out == 0 && $cue_in == 0) {
|
||||||
|
$run_time = Application_Common_DateHelper::calculateLengthInSeconds($p_item['file_length']);
|
||||||
|
} else {
|
||||||
$run_time = $cue_out-$cue_in;
|
$run_time = $cue_out-$cue_in;
|
||||||
|
}
|
||||||
|
|
||||||
$formatter = new LengthFormatter(Application_Common_DateHelper::ConvertMSToHHMMSSmm($run_time*1000));
|
$formatter = new LengthFormatter(Application_Common_DateHelper::ConvertMSToHHMMSSmm($run_time*1000));
|
||||||
$row['runtime'] = $formatter->format();
|
$row['runtime'] = $formatter->format();
|
||||||
|
|
|
@ -89,9 +89,9 @@ class CcPlaylist extends BaseCcPlaylist {
|
||||||
{
|
{
|
||||||
$sql = <<<SQL
|
$sql = <<<SQL
|
||||||
SELECT SUM(cliplength) FROM cc_playlistcontents as pc
|
SELECT SUM(cliplength) FROM cc_playlistcontents as pc
|
||||||
JOIN cc_files as f ON pc.file_id = f.id
|
LEFT JOIN cc_files as f ON pc.file_id = f.id
|
||||||
WHERE PLAYLIST_ID = :p1
|
WHERE PLAYLIST_ID = :p1
|
||||||
AND f.file_exists = true
|
AND f.file_exists is NUll or f.file_exists = true
|
||||||
SQL;
|
SQL;
|
||||||
$stmt = $con->prepare($sql);
|
$stmt = $con->prepare($sql);
|
||||||
$stmt->bindValue(':p1', $this->getDbId());
|
$stmt->bindValue(':p1', $this->getDbId());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue