CC-4244: Playlist Builder: Original Length should not be changed after setting Cue in/out value
-fixed
This commit is contained in:
parent
167881c903
commit
d06f02f1f5
|
@ -192,7 +192,7 @@ class Application_Model_Block
|
||||||
|
|
||||||
$files = array();
|
$files = array();
|
||||||
$sql = <<<"EOT"
|
$sql = <<<"EOT"
|
||||||
SELECT pc.id as id, pc.position, pc.cliplength as length, pc.cuein, pc.cueout, pc.fadein, pc.fadeout, bl.type,
|
SELECT pc.id as id, pc.position, pc.cliplength as length, pc.cuein, pc.cueout, pc.fadein, pc.fadeout, bl.type, f.length as orig_length,
|
||||||
f.id as item_id, f.track_title, f.artist_name as creator, f.file_exists as exists, f.filepath as path FROM cc_blockcontents AS pc
|
f.id as item_id, f.track_title, f.artist_name as creator, f.file_exists as exists, f.filepath as path FROM cc_blockcontents AS pc
|
||||||
LEFT JOIN cc_files AS f ON pc.file_id=f.id
|
LEFT JOIN cc_files AS f ON pc.file_id=f.id
|
||||||
LEFT JOIN cc_block AS bl ON pc.block_id = bl.id
|
LEFT JOIN cc_block AS bl ON pc.block_id = bl.id
|
||||||
|
@ -220,6 +220,10 @@ EOT;
|
||||||
$fades = $this->getFadeInfo($row['position']);
|
$fades = $this->getFadeInfo($row['position']);
|
||||||
$row['fadein'] = $fades[0];
|
$row['fadein'] = $fades[0];
|
||||||
$row['fadeout'] = $fades[1];
|
$row['fadeout'] = $fades[1];
|
||||||
|
|
||||||
|
//format original length
|
||||||
|
$formatter = new LengthFormatter($row['orig_length']);
|
||||||
|
$row['orig_length'] = $formatter->format();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $rows;
|
return $rows;
|
||||||
|
|
|
@ -171,7 +171,8 @@ class Application_Model_Playlist
|
||||||
f.track_title,
|
f.track_title,
|
||||||
f.artist_name AS creator,
|
f.artist_name AS creator,
|
||||||
f.file_exists AS EXISTS,
|
f.file_exists AS EXISTS,
|
||||||
f.filepath AS path
|
f.filepath AS path,
|
||||||
|
f.length AS orig_length
|
||||||
FROM cc_playlistcontents AS pc
|
FROM cc_playlistcontents AS pc
|
||||||
JOIN cc_files AS f ON pc.file_id=f.id
|
JOIN cc_files AS f ON pc.file_id=f.id
|
||||||
WHERE pc.playlist_id = {$this->id}
|
WHERE pc.playlist_id = {$this->id}
|
||||||
|
@ -188,7 +189,8 @@ class Application_Model_Playlist
|
||||||
(ws.name || ': ' || ws.url) AS title,
|
(ws.name || ': ' || ws.url) AS title,
|
||||||
sub.login AS creator,
|
sub.login AS creator,
|
||||||
't'::boolean AS EXISTS,
|
't'::boolean AS EXISTS,
|
||||||
ws.url AS path
|
ws.url AS path,
|
||||||
|
ws.length AS orig_length
|
||||||
FROM cc_playlistcontents AS pc
|
FROM cc_playlistcontents AS pc
|
||||||
JOIN cc_webstream AS ws ON pc.stream_id=ws.id
|
JOIN cc_webstream AS ws ON pc.stream_id=ws.id
|
||||||
LEFT JOIN cc_subjs AS sub ON sub.id = ws.creator_id
|
LEFT JOIN cc_subjs AS sub ON sub.id = ws.creator_id
|
||||||
|
@ -206,7 +208,8 @@ class Application_Model_Playlist
|
||||||
bl.name AS title,
|
bl.name AS title,
|
||||||
sbj.login AS creator,
|
sbj.login AS creator,
|
||||||
't'::boolean AS EXISTS,
|
't'::boolean AS EXISTS,
|
||||||
NULL::text AS path
|
NULL::text AS path,
|
||||||
|
bl.length AS orig_length
|
||||||
FROM cc_playlistcontents AS pc
|
FROM cc_playlistcontents AS pc
|
||||||
JOIN cc_block AS bl ON pc.block_id=bl.id
|
JOIN cc_block AS bl ON pc.block_id=bl.id
|
||||||
JOIN cc_subjs AS sbj ON bl.creator_id=sbj.id
|
JOIN cc_subjs AS sbj ON bl.creator_id=sbj.id
|
||||||
|
@ -240,6 +243,10 @@ SQL;
|
||||||
$fades = $this->getFadeInfo($row['position']);
|
$fades = $this->getFadeInfo($row['position']);
|
||||||
$row['fadein'] = $fades[0];
|
$row['fadein'] = $fades[0];
|
||||||
$row['fadeout'] = $fades[1];
|
$row['fadeout'] = $fades[1];
|
||||||
|
|
||||||
|
//format original length
|
||||||
|
$formatter = new LengthFormatter($row['orig_length']);
|
||||||
|
$row['orig_length'] = $formatter->format();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $rows;
|
return $rows;
|
||||||
|
|
|
@ -55,7 +55,7 @@ if ($item['type'] == 2) {
|
||||||
'id' => $item["id"],
|
'id' => $item["id"],
|
||||||
'cueIn' => $item['cuein'],
|
'cueIn' => $item['cuein'],
|
||||||
'cueOut' => $item['cueout'],
|
'cueOut' => $item['cueout'],
|
||||||
'origLength' => $item['length'])); ?>
|
'origLength' => $item['orig_length'])); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue