CC-2301 : updating playlist offsets in playlist builder to reflect crossfade overlaps.
This commit is contained in:
parent
2462e4f144
commit
2a1ac0ddb9
|
@ -195,6 +195,7 @@ SELECT pc.id AS id,
|
|||
pc.cueout,
|
||||
pc.fadein,
|
||||
pc.fadeout,
|
||||
pc.trackoffset,
|
||||
bl.type,
|
||||
f.LENGTH AS orig_length,
|
||||
f.id AS item_id,
|
||||
|
@ -235,7 +236,9 @@ SQL;
|
|||
$row['cueInSec'] = Application_Common_DateHelper::playlistTimeToSeconds($row['cuein']);
|
||||
$row['cueOutSec'] = Application_Common_DateHelper::playlistTimeToSeconds($row['cueout']);
|
||||
|
||||
$trackoffset = $row['trackoffset'];
|
||||
$offset += $clipSec;
|
||||
$offset -= $trackoffset;
|
||||
$offset_cliplength = Application_Common_DateHelper::secondsToPlaylistTime($offset);
|
||||
|
||||
//format the length for UI.
|
||||
|
|
|
@ -161,6 +161,7 @@ class Application_Model_Playlist implements Application_Model_LibraryEditable
|
|||
pc.cueout,
|
||||
pc.fadein,
|
||||
pc.fadeout,
|
||||
pc.trackoffset,
|
||||
f.id AS item_id,
|
||||
f.track_title,
|
||||
f.artist_name AS creator,
|
||||
|
@ -188,6 +189,7 @@ SQL;
|
|||
pc.cueout,
|
||||
pc.fadein,
|
||||
pc.fadeout,
|
||||
pc.trackoffset,
|
||||
ws.id AS item_id,
|
||||
(ws.name || ': ' || ws.url) AS title,
|
||||
sub.login AS creator,
|
||||
|
@ -208,6 +210,7 @@ SQL;
|
|||
pc.cueout,
|
||||
pc.fadein,
|
||||
pc.fadeout,
|
||||
pc.trackoffset,
|
||||
bl.id AS item_id,
|
||||
bl.name AS title,
|
||||
sbj.login AS creator,
|
||||
|
@ -222,6 +225,7 @@ SQL;
|
|||
AND pc.TYPE = 2)) AS temp
|
||||
ORDER BY temp.position;
|
||||
SQL;
|
||||
//Logging::info($sql);
|
||||
|
||||
$params = array(
|
||||
':playlist_id1'=>$this->id, ':playlist_id2'=>$this->id, ':playlist_id3'=>$this->id);
|
||||
|
@ -233,13 +237,18 @@ SQL;
|
|||
|
||||
$offset = 0;
|
||||
foreach ($rows as &$row) {
|
||||
|
||||
//Logging::info($row);
|
||||
|
||||
$clipSec = Application_Common_DateHelper::playlistTimeToSeconds($row['length']);
|
||||
$row['trackSec'] = $clipSec;
|
||||
|
||||
$row['cueInSec'] = Application_Common_DateHelper::playlistTimeToSeconds($row['cuein']);
|
||||
$row['cueOutSec'] = Application_Common_DateHelper::playlistTimeToSeconds($row['cueout']);
|
||||
|
||||
$trackoffset = $row['trackoffset'];
|
||||
$offset += $clipSec;
|
||||
$offset -= $trackoffset;
|
||||
$offset_cliplength = Application_Common_DateHelper::secondsToPlaylistTime($offset);
|
||||
|
||||
//format the length for UI.
|
||||
|
|
|
@ -94,7 +94,7 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
|||
'item2Url' => $nextFileUrl,
|
||||
'fadeOut' => $items[$i]['fadeout'],
|
||||
'fadeIn' => $items[$i+1]['fadein'],
|
||||
'offset' => $items[$i]['trackSec'],
|
||||
'offset' => $items[$i]['trackSec'] - $items[$i+1]['trackoffset'],
|
||||
'cueIn1' => $items[$i]['cueInSec'],
|
||||
'cueOut1' => $items[$i]['cueOutSec'],
|
||||
'cueIn2' => $items[$i+1]['cueInSec'],
|
||||
|
|
|
@ -167,6 +167,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
function(json){
|
||||
|
||||
$el.dialog('destroy');
|
||||
$el.remove();
|
||||
|
||||
if (json.error !== undefined){
|
||||
playlistError(json);
|
||||
|
@ -199,6 +200,7 @@ var AIRTIME = (function(AIRTIME){
|
|||
function(json){
|
||||
|
||||
$el.dialog('destroy');
|
||||
$el.remove();
|
||||
|
||||
if (json.error !== undefined){
|
||||
playlistError(json);
|
||||
|
|
Loading…
Reference in New Issue