CC-5310 : Playlist -> Crash happens on draging a song after a webstream into a playlist
This commit is contained in:
parent
12a62a3827
commit
6d5531f341
|
@ -10,6 +10,9 @@ if ($item['type'] == 2) {
|
||||||
$staticBlock = $bl->isStatic();
|
$staticBlock = $bl->isStatic();
|
||||||
$fileUrl = null;
|
$fileUrl = null;
|
||||||
}
|
}
|
||||||
|
else if ($item['type'] == 1) {
|
||||||
|
$fileUrl = null;
|
||||||
|
}
|
||||||
else if ($item['type'] == 0) {
|
else if ($item['type'] == 0) {
|
||||||
$audiofile = Application_Model_StoredFile::RecallById($item['item_id']);
|
$audiofile = Application_Model_StoredFile::RecallById($item['item_id']);
|
||||||
$fileUrl = $audiofile->getFileUrl();
|
$fileUrl = $audiofile->getFileUrl();
|
||||||
|
@ -17,12 +20,12 @@ else if ($item['type'] == 0) {
|
||||||
|
|
||||||
if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
||||||
$nextAudiofile = Application_Model_StoredFile::RecallById($items[$i+1]['item_id']);
|
$nextAudiofile = Application_Model_StoredFile::RecallById($items[$i+1]['item_id']);
|
||||||
$nextFileUrl = $nextAudiofile->getFileUrl();
|
$nextFileUrl = $nextAudiofile->getFileUrl();
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<li class="ui-state-default" id="spl_<?php echo $item["id"] ?>" unqid="<?php echo $item["id"]; ?>">
|
<li class="ui-state-default" id="spl_<?php echo $item["id"] ?>" unqid="<?php echo $item["id"]; ?>">
|
||||||
<div class="list-item-container">
|
<div class="list-item-container">
|
||||||
|
|
||||||
<?php if ($item['type'] == 0 && $item['exists']):?>
|
<?php if ($item['type'] == 0 && $item['exists']):?>
|
||||||
<div class="big_play" audioFile="<?php echo $item["id"]; ?>" data-mime-type="<?php echo $item["mime"]; ?>">
|
<div class="big_play" audioFile="<?php echo $item["id"]; ?>" data-mime-type="<?php echo $item["mime"]; ?>">
|
||||||
<span class="ui-icon ui-icon-play"></span>
|
<span class="ui-icon ui-icon-play"></span>
|
||||||
|
@ -89,8 +92,8 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
||||||
if(($i < count($items) -1) && !($items[$i]['type'] == 2 && $items[$i+1]['type'])):
|
if(($i < count($items) -1) && !($items[$i]['type'] == 2 && $items[$i+1]['type'])):
|
||||||
?>
|
?>
|
||||||
<div id="crossfade_<?php echo $i ?>-<?php echo $i+1 ?>" class="crossfade clearfix" style="display: none">
|
<div id="crossfade_<?php echo $i ?>-<?php echo $i+1 ?>" class="crossfade clearfix" style="display: none">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
$vars = array(
|
$vars = array(
|
||||||
'item1' => $items[$i]['id'],
|
'item1' => $items[$i]['id'],
|
||||||
'fadeOut' => $items[$i]['fadeout'],
|
'fadeOut' => $items[$i]['fadeout'],
|
||||||
|
@ -100,7 +103,7 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
||||||
'cueOut1' => $items[$i]['cueOutSec'],
|
'cueOut1' => $items[$i]['cueOutSec'],
|
||||||
'item1Url' => $fileUrl
|
'item1Url' => $fileUrl
|
||||||
);
|
);
|
||||||
|
|
||||||
$item2 = array(
|
$item2 = array(
|
||||||
'item2Url' => $nextFileUrl,
|
'item2Url' => $nextFileUrl,
|
||||||
'item2' => $items[$i+1]['id'],
|
'item2' => $items[$i+1]['id'],
|
||||||
|
@ -109,12 +112,12 @@ if (($i < count($items) -1) && ($items[$i+1]['type'] == 0)) {
|
||||||
'cueIn2' => $items[$i+1]['cueInSec'],
|
'cueIn2' => $items[$i+1]['cueInSec'],
|
||||||
'cueOut2' => $items[$i+1]['cueOutSec']
|
'cueOut2' => $items[$i+1]['cueOutSec']
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isset($nextFileUrl)) {
|
if (isset($nextFileUrl)) {
|
||||||
$vars = $vars + $item2;
|
$vars = $vars + $item2;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $this->partial('playlist/set-fade.phtml', $vars);
|
echo $this->partial('playlist/set-fade.phtml', $vars);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
Loading…
Reference in New Issue