parent
cfca8290a3
commit
f30283d544
14 changed files with 374 additions and 240 deletions
|
@ -642,6 +642,53 @@ $ui_fmask = array(
|
|||
)
|
||||
)
|
||||
),
|
||||
'PL.setItemPlaylength' => array(
|
||||
'act' => array(
|
||||
'element' => 'act',
|
||||
'type' => 'hidden',
|
||||
),
|
||||
'id' => array(
|
||||
'element' => 'id',
|
||||
'type' => 'hidden'
|
||||
),
|
||||
'elemId' => array(
|
||||
'element' => 'elemId',
|
||||
'type' => 'hidden'
|
||||
),
|
||||
'duration' => array(
|
||||
'element' => 'duration',
|
||||
'type' => 'hidden'
|
||||
),
|
||||
'playlength' => array(
|
||||
'element' => 'playlength',
|
||||
'type' => 'date',
|
||||
'label' => 'Playlength',
|
||||
'options' => array('format' => 'His'),
|
||||
),
|
||||
array(
|
||||
'element' => 'cancel',
|
||||
'type' => 'button',
|
||||
'label' => 'Cancel',
|
||||
'attributes'=> array('onClick' => 'window.close()'),
|
||||
'groupit' => TRUE
|
||||
),
|
||||
array(
|
||||
'element' => 'reset',
|
||||
'type' => 'reset',
|
||||
'label' => 'Reset',
|
||||
'groupit' => TRUE
|
||||
),
|
||||
array(
|
||||
'element' => 'submitter',
|
||||
'type' => 'button',
|
||||
'label' => 'Submit',
|
||||
'attributes'=> array('onClick' => 'PL_checkItemPlaylength()'),
|
||||
'groupit' => TRUE
|
||||
),
|
||||
array(
|
||||
'group' => array('cancel', 'reset', 'submitter')
|
||||
)
|
||||
),
|
||||
'schedule' => array(
|
||||
array(
|
||||
'element' => 'act',
|
||||
|
|
|
@ -101,6 +101,11 @@ if (is_array($_REQUEST['popup'])){
|
|||
$Smarty->display('popup/PLAYLIST.arrangeItems.tpl');
|
||||
break;
|
||||
|
||||
case "PL.setItemPlaylengthForm":
|
||||
$Smarty->assign('dynform', $uiBrowser->PLAYLIST->setItemPlaylengthForm($_REQUEST['id'], $_REQUEST['elemId'], $ui_fmask['PL.setItemPlaylength']));
|
||||
$Smarty->display('popup/PLAYLIST.setItemPlaylength.tpl');
|
||||
break;
|
||||
|
||||
case "SCHEDULER.addItem":
|
||||
$Smarty->display('popup/SCHEDULER.addItem.tpl');
|
||||
break;
|
||||
|
@ -119,9 +124,9 @@ if (is_array($_REQUEST['popup'])){
|
|||
$Smarty->display('popup/testStream.tpl');
|
||||
break;
|
||||
|
||||
case "listen2AudioClip":
|
||||
$Smarty->assign('data', $uiBrowser->listen2AudioClip($_REQUEST['id']));
|
||||
$Smarty->display('popup/listen2AudioClip.tpl');
|
||||
case "listen2Audio":
|
||||
$Smarty->assign('data', $uiBrowser->listen2Audio($_REQUEST['id']));
|
||||
$Smarty->display('popup/listen2Audio.tpl');
|
||||
break;
|
||||
|
||||
case "help":
|
||||
|
|
|
@ -180,11 +180,17 @@ switch($_REQUEST['act']){
|
|||
break;
|
||||
|
||||
case "PL.addItem":
|
||||
if ($uiHandler->PLAYLIST->addItem($_REQUEST['id']) !== FALSE)
|
||||
if ($uiHandler->PLAYLIST->addItem($_REQUEST['id'], $_REQUEST['playlength']) !== FALSE)
|
||||
$uiHandler->SCRATCHPAD->addItem($_REQUEST['id']);
|
||||
$uiHandler->PLAYLIST->setReload();
|
||||
break;
|
||||
|
||||
|
||||
case "PL.setItemPlaylength":
|
||||
$uiHandler->PLAYLIST->setItemPlaylength($_REQUEST['elemId'], $_REQUEST['playlength']);
|
||||
$uiHandler->PLAYLIST->setReload();
|
||||
break;
|
||||
|
||||
case "PL.removeItem":
|
||||
$uiHandler->PLAYLIST->removeItem($_REQUEST['id']);
|
||||
$uiHandler->PLAYLIST->setReload();
|
||||
|
@ -279,14 +285,20 @@ switch($_REQUEST['act']){
|
|||
die();
|
||||
break;
|
||||
|
||||
default:
|
||||
case NULL:
|
||||
if ($uiHandler->userid) {
|
||||
$uiHandler->_retMsg('The uploaded filer is bigger than allowed in system settings. See "Help", chapter "Troubleshooting" for more information.');
|
||||
}
|
||||
|
||||
$uiHandler->redirUrl = UI_BROWSER;
|
||||
|
||||
if ($_REQUEST['is_popup']) $uiHandler->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
||||
break;
|
||||
|
||||
default:
|
||||
$uiHandler->_retMsg(tra('Unknown method: $1', $_REQUEST['act']));
|
||||
$uiHandler->redirUrl = UI_BROWSER;
|
||||
if ($_REQUEST['is_popup']) $uiHandler->redirUrl = UI_BROWSER.'?popup[]=_reload_parent&popup[]=_close';
|
||||
break;
|
||||
}
|
||||
|
||||
if ($uiHandler->alertMsg) {
|
||||
|
|
|
@ -2,24 +2,29 @@ onClick="return contextmenu('{$i.id}'
|
|||
, 'SP.addItem'
|
||||
|
||||
{if $i.type|lower == 'audioclip'}
|
||||
, 'listen', '{$i.gunid}', '##audioclip##'
|
||||
, 'listen', '{$i.gunid}'
|
||||
|
||||
{if $_PL_activeId}
|
||||
, 'PL.addItem'
|
||||
{else}
|
||||
, 'PL.create', '{$i.title|truncate:20|escape:'html'}'
|
||||
, 'PL.create'
|
||||
{/if}
|
||||
, 'edit', '##audioclip##'
|
||||
, 'delete', '##audioclip##'
|
||||
|
||||
, 'edit'
|
||||
, 'delete'
|
||||
{/if}
|
||||
|
||||
{if $i.type|lower == 'webstream'}
|
||||
, 'listen', '{$i.gunid}'
|
||||
|
||||
{if $_PL_activeId}
|
||||
, 'PL.addItem'
|
||||
, 'PL.addStream'
|
||||
{else}
|
||||
, 'PL.create', '{$i.title|truncate:20}'
|
||||
, 'PL.create'
|
||||
{/if}
|
||||
, 'edit', '##webstream##'
|
||||
, 'delete', '##webstream##'
|
||||
|
||||
, 'edit'
|
||||
, 'delete'
|
||||
{/if}
|
||||
|
||||
{if $i.type|lower == 'playlist'}
|
||||
|
@ -27,12 +32,15 @@ onClick="return contextmenu('{$i.id}'
|
|||
{if $_PL_activeId == $i.id}
|
||||
, 'PL.release'
|
||||
{else}
|
||||
, 'SCHEDULER.addPL', 'PL.addItem', 'delete'
|
||||
, 'SCHEDULER.addPL'
|
||||
, 'PL.addItem'
|
||||
, 'delete'
|
||||
{/if}
|
||||
{else}
|
||||
, 'SCHEDULER.addPL', 'PL.activate'
|
||||
, 'PL.create', '{$i.title|truncate:20}'
|
||||
, 'delete', '##playlist##'
|
||||
, 'SCHEDULER.addPL'
|
||||
, 'PL.activate'
|
||||
, 'PL.create'
|
||||
, 'delete'
|
||||
{/if}
|
||||
{/if}
|
||||
)"
|
||||
|
|
|
@ -20,7 +20,7 @@ if (window.attachEvent) window.attachEvent("onload", sfHover);
|
|||
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addFileData">##Add Audio##</a>
|
||||
<ul>
|
||||
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addFileData">##Audioclip##</a></li>
|
||||
{* <li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addWebstreamData">##Webstream##</a></li> *}
|
||||
<li><a href="{$UI_BROWSER}?folderId={$START.fid}&act=addWebstreamData">##Webstream##</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a>##Media Library##</a>
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
style="cursor: pointer"
|
||||
onClick="return contextmenu('{$i.attrs.id}',
|
||||
{if $i.type|lower == 'audioclip'}
|
||||
'listen', '{$i.gunid}', '{$i.type}',
|
||||
|
||||
{if $i.type|lower == 'webstream'}
|
||||
'listen', '{$i.gunid}',
|
||||
'PL.changeItemPlaylength',
|
||||
{/if}
|
||||
|
||||
{if $i.type|lower == 'audioclip'}
|
||||
'listen', '{$i.gunid}',
|
||||
'PL.changeItemPlaylength',
|
||||
{/if}
|
||||
|
||||
'PL.removeItem'
|
||||
)"
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<td><input type="checkbox" class="checkbox" name="{$i.attrs.id}"/></td>
|
||||
<td {include file="playlist/actionhandler.tpl"}>{$i.title}</td>
|
||||
<td {include file="playlist/actionhandler.tpl"} style="text-align: right">
|
||||
{assign var="_duration" value=$i.duration}{niceTime in=$_duration}
|
||||
{assign var="_duration" value=$i.playlength}{niceTime in=$_duration}
|
||||
</td>
|
||||
<td {include file="playlist/actionhandler.tpl"}>{$i.creator}</td>
|
||||
<td {include file="playlist/actionhandler.tpl"}>
|
||||
|
|
|
@ -15,8 +15,10 @@
|
|||
{if $data.type.valid === true}
|
||||
{tra str='Stream is wanted type <font color="green">$1</font>.' 1=$data.type.type}
|
||||
|
||||
{else}
|
||||
{elseif $data.type.type}
|
||||
{tra str='Stream has wrong content type <font color="red">$1</font>.' 1=$data.type.type}
|
||||
{else}
|
||||
##No content type declared.##
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -2,24 +2,33 @@ onClick="return contextmenu('{$i.id}'
|
|||
, 'SP.removeItem'
|
||||
|
||||
{if $i.type|lower == 'audioclip'}
|
||||
, 'listen', '{$i.gunid}', '##audioclip##'
|
||||
, 'listen', '{$i.gunid}'
|
||||
|
||||
{if $_PL_activeId}
|
||||
, 'PL.addItem'
|
||||
{else}
|
||||
, 'PL.create', '{$i.title|truncate:20|escape:'html'}'
|
||||
, 'PL.create'
|
||||
{/if}
|
||||
, 'edit', '##audioclip##'
|
||||
, 'delete', '##audioclip##'
|
||||
|
||||
, 'edit'
|
||||
, 'delete'
|
||||
{/if}
|
||||
|
||||
{if $i.type|lower == 'webstream'}
|
||||
, 'listen', '{$i.gunid}'
|
||||
|
||||
{if $_PL_activeId}
|
||||
, 'PL.addItem'
|
||||
{if $i.duration == '00:00:00.000000'}
|
||||
, 'PL.addStream'
|
||||
{else}
|
||||
, 'PL.create', '{$i.title|truncate:20}'
|
||||
, 'PL.addItem'
|
||||
{/if}
|
||||
, 'edit', '##webstream##'
|
||||
, 'delete', '##webstream##'
|
||||
{else}
|
||||
, 'PL.create'
|
||||
{/if}
|
||||
|
||||
, 'edit'
|
||||
, 'delete'
|
||||
{/if}
|
||||
|
||||
{if $i.type|lower == 'playlist'}
|
||||
|
@ -27,12 +36,16 @@ onClick="return contextmenu('{$i.id}'
|
|||
{if $_PL_activeId == $i.id}
|
||||
, 'PL.release'
|
||||
{elseif $PL->isAvailable($i.id) == true}
|
||||
, 'SCHEDULER.addPL', 'PL.addItem', 'PL.activate', 'PL.delete'
|
||||
, 'SCHEDULER.addPL'
|
||||
, 'PL.addItem'
|
||||
, 'PL.activate'
|
||||
, 'PL.delete'
|
||||
{/if}
|
||||
{elseif $PL->isAvailable($i.id) == true}
|
||||
, 'SCHEDULER.addPL', 'PL.activate'
|
||||
, 'PL.create', '{$i.title|truncate:20}'
|
||||
, 'delete', '##playlist##'
|
||||
, 'SCHEDULER.addPL'
|
||||
, 'PL.activate'
|
||||
, 'PL.create'
|
||||
, 'delete'
|
||||
{/if}
|
||||
{/if}
|
||||
)"
|
|
@ -34,6 +34,14 @@
|
|||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: hpopup('{$UI_HANDLER}?act=PL.addItem&id="+param+"')\" "+oF+"> ##Add to playlist## </a></li>";
|
||||
break;
|
||||
|
||||
case "PL.addStream":
|
||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: popup('{$UI_BROWSER}?popup[]=PL.setItemPlaylengthForm&id="+param+"', 'PL.setStreamPlaylength', 400, 50)\" "+oF+"> ##Add to playlist## </a></li>";
|
||||
break;
|
||||
|
||||
case "PL.changeItemPlaylength":
|
||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: popup('{$UI_BROWSER}?popup[]=PL.setItemPlaylengthForm&elemId="+param+"', 'PL.setItemPlaylength', 400, 50)\" "+oF+"> ##Change playlegth## </a></li>";
|
||||
break;
|
||||
|
||||
case "PL.removeItem":
|
||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: hpopup('{$UI_HANDLER}?act=PL.removeItem&id="+param+"')\" "+oF+"> ##Remove from playlist## </a></li>";
|
||||
break;
|
||||
|
@ -67,16 +75,14 @@
|
|||
break;
|
||||
|
||||
case "listen":
|
||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: hpopup('{$UI_BROWSER}?popup[]=listen2AudioClip&id="+contextmenu.arguments[++i]+"')\" "+oF+"> ##Listen## </a></li>";
|
||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: hpopup('{$UI_BROWSER}?popup[]=listen2Audio&id="+contextmenu.arguments[++i]+"')\" "+oF+"> ##Listen## </a></li>";
|
||||
break;
|
||||
|
||||
case "edit":
|
||||
i++;
|
||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href='{$UI_BROWSER}?act=editItem&id="+param+"' "+oF+"> ##Edit## </a></li>";
|
||||
break;
|
||||
|
||||
case "delete":
|
||||
i++;
|
||||
contextmenuHtml = contextmenuHtml + "<li><a class='contextmenu' href=\"javascript: popup('{$UI_BROWSER}?popup[]=deleteItem&id="+param+"', 'deleteItem', 400, 50)\" "+oF+"> ##Delete## </a></li>";
|
||||
break;
|
||||
|
||||
|
|
|
@ -432,17 +432,16 @@ class uiBrowser extends uiBase {
|
|||
);
|
||||
}
|
||||
|
||||
function listen2AudioClip($clipid)
|
||||
function listen2Audio($clipid)
|
||||
{
|
||||
#$pls = "[playlist]\n".
|
||||
#$pls .= "File1=http://{$_SERVER['SERVER_NAME']}".$this->config['accessRawAudioUrl']."?sessid={$this->sessid}&id=$clipid\n";
|
||||
#$pls .= "Title1=Mein Titel\n";
|
||||
#$pls .= "NumberOfEntries=1\nVersion=2";
|
||||
|
||||
#$m3u = "#EXTM3U\n";
|
||||
#$m3u .= "#EXTINF:111,Mein Titel\n";
|
||||
$m3u .= "http://{$_SERVER['SERVER_NAME']}".$this->config['accessRawAudioUrl']."?sessid={$this->sessid}&id=$clipid\n";
|
||||
$id = $this->gb->_idFromGunid($clipid);
|
||||
$type = $this->gb->getFileType($id);
|
||||
|
||||
if (strtolower($type) === strtolower(UI_FILETYPE_AUDIOCLIP)) {
|
||||
$m3u = "http://{$_SERVER['SERVER_NAME']}".$this->config['accessRawAudioUrl']."?sessid={$this->sessid}&id=$clipid\n";
|
||||
} else {
|
||||
$m3u = $this->_getMDataValue($id, UI_MDATA_KEY_URL);
|
||||
}
|
||||
touch(UI_TESTSTREAM_MU3_TMP);
|
||||
$handle = fopen(UI_TESTSTREAM_MU3_TMP, "w");
|
||||
fwrite($handle, $m3u);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
ini_set('memory_limit', '64M');
|
||||
|
||||
## Warning/Error level
|
||||
define('UI_DEBUG', TRUE);
|
||||
define('UI_DEBUG', FALSE);
|
||||
define('UI_VERBOSE', FALSE);
|
||||
define('UI_WARNING', TRUE);
|
||||
define('UI_ERROR', TRUE);
|
||||
|
@ -111,7 +111,7 @@ define('UI_PL_ELEM_FADEOUT', 'fadeOut');
|
|||
|
||||
|
||||
## LS stuff
|
||||
require_once '../../storageServer/var/conf.php';
|
||||
require_once '../../../storageServer/var/conf.php';
|
||||
## extent config
|
||||
$config = array_merge($config,
|
||||
array(
|
||||
|
@ -122,7 +122,8 @@ $config = array_merge($config,
|
|||
),
|
||||
'stream_types' => array(
|
||||
'application/ogg',
|
||||
'audio/mpeg'
|
||||
'audio/mpeg',
|
||||
'audio/x-mpegurl'
|
||||
),
|
||||
'languages' => array(
|
||||
'ar_JO' => 'Arabic(JO)',
|
||||
|
@ -144,7 +145,7 @@ require_once dirname(__FILE__).'/ui_scratchpad.class.php';
|
|||
require_once dirname(__FILE__).'/ui_playlist.class.php';
|
||||
require_once dirname(__FILE__).'/ui_search.class.php';
|
||||
require_once dirname(__FILE__).'/ui_browse.class.php';
|
||||
require_once '../../storageServer/var/GreenBox.php';
|
||||
require_once '../../../storageServer/var/GreenBox.php';
|
||||
require_once dirname(__FILE__).'/formmask/generic.inc.php';
|
||||
require_once dirname(__FILE__).'/ui_calendar.class.php';
|
||||
require_once dirname(__FILE__).'/ui_scheduler.class.php';
|
||||
|
|
|
@ -70,7 +70,7 @@ class uiPlaylist
|
|||
}
|
||||
$token = $this->Base->gb->lockPlaylistForEdit($plid, $this->Base->sessid);
|
||||
if (PEAR::isError($token)) {
|
||||
#print_r($token);
|
||||
if (UI_VERBOSE === TRUE) print_r($token);
|
||||
$this->Base->_retMsg('Unable to open playlist "$1".', $this->Base->_getMDataValue($plid, UI_MDATA_KEY_TITLE));
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ class uiPlaylist
|
|||
}
|
||||
$plgunid = $this->Base->gb->releaseLockedPlaylist($this->token, $this->Base->sessid);
|
||||
if (PEAR::isError($plgunid)) {
|
||||
#print_r($plgunid);
|
||||
if (UI_VERBOSE === TRUE) print_r($plgunid);
|
||||
if (UI_WARNING) $this->Base->_retMsg('Unable to release playlist.');
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ class uiPlaylist
|
|||
}
|
||||
$plgunid = $this->Base->gb->revertEditedPlaylist($this->token, $this->Base->sessid);
|
||||
if (PEAR::isError($plgunid)) {
|
||||
# print_r($plgunid);
|
||||
if (UI_VERBOSE === TRUE) print_r($plgunid);
|
||||
if (UI_WARNING) $this->Base->_retMsg('Unable to revert to locked state.');
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -176,21 +176,27 @@ class uiPlaylist
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
function addItem($elemIds)
|
||||
function addItem($elemIds, $duration=null)
|
||||
{
|
||||
$this->changed = TRUE;
|
||||
$fadeIn = null;
|
||||
$fadeOut = null;
|
||||
$pause = null;
|
||||
|
||||
if (!$elemIds) {
|
||||
if (UI_WARNING) $this->Base->_retMsg('No item(s) selected.');
|
||||
return FALSE;
|
||||
}
|
||||
if (!is_array($elemIds))
|
||||
if (!is_array($elemIds)) {
|
||||
$elemIds = array($elemIds);
|
||||
|
||||
}
|
||||
if (isset($duration)) {
|
||||
$length = sprintf('%02d', $duration['H']).':'.sprintf('%02d', $duration['i']).':'.sprintf('%02d', $duration['s']).'.000000';
|
||||
}
|
||||
foreach ($elemIds as $elemId) {
|
||||
$r = $this->Base->gb->addAudioClipToPlaylist($this->token, $elemId, $this->Base->sessid);
|
||||
$r = $this->Base->gb->addAudioClipToPlaylist($this->token, $elemId, $this->Base->sessid, $fadeIn, $fadeOut, $length, $pause);
|
||||
if (PEAR::isError($r)) {
|
||||
#print_r($r);
|
||||
if (UI_VERBOSE === TRUE) print_r($r);
|
||||
$this->Base->_retMsg('Error while trying to add item to playlist.');
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -258,6 +264,7 @@ class uiPlaylist
|
|||
unset($this->flat);
|
||||
$this->_plwalk($this->getPLArray($id));
|
||||
|
||||
if (is_Array($this->flat)) {
|
||||
reset($this->flat);
|
||||
$this->flat[key($this->flat)]['firstInList'] = true;
|
||||
end($this->flat);
|
||||
|
@ -265,6 +272,9 @@ class uiPlaylist
|
|||
reset($this->flat);
|
||||
|
||||
return $this->flat;
|
||||
} else {
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -279,6 +289,7 @@ class uiPlaylist
|
|||
#$this->flat["$parent.$node"]['type'] = $sub['elementname'];
|
||||
$this->flat[$parent] = $this->Base->_getMetaInfo($this->Base->gb->_idFromGunid($sub['attrs']['id']));
|
||||
$this->flat[$parent]['attrs'] = $attrs;
|
||||
$this->flat[$parent]['playlength'] = $sub['attrs']['playlength'];
|
||||
}
|
||||
if ($sub['elementname']===UI_PL_ELEM_FADEINFO) {
|
||||
$this->flat[$parent][UI_PL_ELEM_FADEIN] = GreenBox::_plTimeToSecs($sub['attrs'][UI_PL_ELEM_FADEIN]);
|
||||
|
@ -337,7 +348,7 @@ class uiPlaylist
|
|||
$r = $this->Base->gb->changeFadeInfo($this->token, $i, $val[UI_PL_ELEM_FADEIN], $val[UI_PL_ELEM_FADEOUT], $this->Base->sessid);
|
||||
#print_r($r);
|
||||
if (PEAR::isError($r)) {
|
||||
if (UI_VERBOSE) print_r($r);
|
||||
if (UI_VERBOSE === TRUE) print_r($r);
|
||||
$this->Base->_retMsg('Changing fade information failed.');
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -348,7 +359,7 @@ class uiPlaylist
|
|||
$r = $this->Base->gb->changeFadeInfo($this->token, $v['attrs']['id'], $type==='pause'?$pause:$xfade, $type==='pause'?$pause:$xfade, $this->Base->sessid);
|
||||
#print_r($r);
|
||||
if (PEAR::isError($r)) {
|
||||
if (UI_VERBOSE) print_r($r);
|
||||
if (UI_VERBOSE === TRUE) print_r($r);
|
||||
$this->Base->_retMsg('Changing fade information failed.');
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -364,7 +375,7 @@ class uiPlaylist
|
|||
|
||||
$r = $this->Base->gb->moveAudioClipInPlaylist($this->token, $id, $pos, $this->Base->sessid);
|
||||
if (PEAR::isError($r)) {
|
||||
if (UI_VERBOSE) print_r($r);
|
||||
if (UI_VERBOSE === TRUE) print_r($r);
|
||||
$this->Base->_retMsg('Cannot move item.');
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -382,7 +393,7 @@ class uiPlaylist
|
|||
$pos++;
|
||||
$r = $this->Base->gb->moveAudioClipInPlaylist($this->token, $id, $pos, $this->Base->sessid);
|
||||
if (PEAR::isError($r)) {
|
||||
if (UI_VERBOSE) print_r($r);
|
||||
if (UI_VERBOSE === TRUE) print_r($r);
|
||||
$this->Base->_retMsg('Cannot move item.');
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -468,6 +479,28 @@ class uiPlaylist
|
|||
return $renderer->toArray();
|
||||
}
|
||||
|
||||
function setItemPlaylengthForm($id, $elemId, $mask)
|
||||
{
|
||||
if (isset($elemId)) {
|
||||
$mask['act']['constant'] = 'PL.setItemPlaylength';
|
||||
$mask['elemId']['constant'] = $elemId;
|
||||
$element = $this->getCurrElement($elemId);
|
||||
$mask['playlength']['default'] = substr($element['playlength'], 0, 8);
|
||||
$mask['duration']['constant'] = substr($element['duration'], 0, 8);
|
||||
} else {
|
||||
$mask['act']['constant'] = 'PL.addItem';
|
||||
$mask['id']['constant'] = $id;
|
||||
$mask['playlength']['default'] = substr($this->Base->_getMDataValue($id, UI_MDATA_KEY_DURATION), 0, 8);
|
||||
$mask['duration']['constant'] = $mask['playlength']['default'];
|
||||
}
|
||||
|
||||
$form = new HTML_QuickForm('PL_setItemPlaylengthForm', UI_STANDARD_FORM_METHOD, UI_HANDLER);
|
||||
$this->Base->_parseArr2Form($form, $mask);
|
||||
$renderer =& new HTML_QuickForm_Renderer_Array(true, true);
|
||||
$form->accept($renderer);
|
||||
return $renderer->toArray();
|
||||
}
|
||||
|
||||
|
||||
function metaDataForm($langid)
|
||||
{
|
||||
|
@ -531,7 +564,7 @@ class uiPlaylist
|
|||
foreach ($mData as $key=>$val) {
|
||||
$r = $this->Base->gb->setMDataValue($id, $key, $this->Base->sessid, $val, $curr_langid);
|
||||
if (PEAR::isError($r)) {
|
||||
#print_r($r);
|
||||
if (UI_VERBOSE === TRUE) print_r($r);
|
||||
$this->Base->_retMsg('Unable to set "$1" to value "$2".', $key, $val);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue