Merged in Naomis changes
This commit is contained in:
commit
9bf149b5c6
|
@ -68,6 +68,19 @@ $ui_fmask = array(
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'label' => 'Scheduler startup script',
|
'label' => 'Scheduler startup script',
|
||||||
'required' => false,
|
'required' => false,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'element' => 'archiveServerLocation',
|
||||||
|
'isPref' => TRUE,
|
||||||
|
'type' => 'text',
|
||||||
|
'label' => 'Archive server location URL',
|
||||||
|
'required' => false,
|
||||||
|
),
|
||||||
|
array(
|
||||||
|
'rule' => 'regex',
|
||||||
|
'element' => 'archiveServerLocation',
|
||||||
|
'format' => UI_REGEX_URL,
|
||||||
|
'rulemsg' => 'archive server location seems not to be valid'
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'element' => UI_SCRATCHPAD_MAXLENGTH_KEY,
|
'element' => UI_SCRATCHPAD_MAXLENGTH_KEY,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1012,18 +1012,18 @@ table.masterpalette td{
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#plupload_error table {
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#plupload_error table tr {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#plupload_error table td {
|
#plupload_error table td {
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#plupload_error table td:first-child {
|
#plupload_error table td:first-child {
|
||||||
border-right: 1px solid #000000;
|
border-right: 1px solid #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp_tool_tip table {
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sp_tool_tip table td {
|
||||||
|
border: 0;
|
||||||
}
|
}
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
<script type="text/javascript" src="assets/plupload/plupload.full.min.js"></script>
|
<script type="text/javascript" src="assets/plupload/plupload.full.min.js"></script>
|
||||||
<script type="text/javascript" src="assets/plupload/jquery.plupload.queue.min.js"></script>
|
<script type="text/javascript" src="assets/plupload/jquery.plupload.queue.min.js"></script>
|
||||||
|
<script type="text/javascript" src="assets/qtip/jquery.qtip.min.js"></script>
|
||||||
|
|
||||||
{include file="script/basics.js.tpl"}
|
{include file="script/basics.js.tpl"}
|
||||||
{include file="script/contextmenu.js.tpl"}
|
{include file="script/contextmenu.js.tpl"}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<div style="width: 574px;">
|
<div style="width: 574px;">
|
||||||
<div style="float: left;"><h1>##Playlist Editor## </h1></div>
|
<div style="float: left;"><h1>##Playlist Editor## </h1></div>
|
||||||
<div style="float: right;"><h1><a href="{$UI_BROWSER}?act=PL.editMetaData" style="color: #666666">{$PL->title} {getHour time=$PL->duration}##h## {getMinute time=$PL->duration}##m## {getSecond time=$PL->duration}##s##</a></h1></div>
|
<div style="float: right;"><h1><a href="{$UI_BROWSER}?act=PL.editMetaData" style="color: #666666">{$PL->title} {niceTime in=$PL->duration} </a></h1></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="head" style="width: 574px;">
|
<div class="head" style="width: 574px;">
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
{if count($SCRATCHPAD) >= 1}
|
{if count($SCRATCHPAD) >= 1}
|
||||||
{foreach from=$SCRATCHPAD item=i}
|
{foreach from=$SCRATCHPAD item=i}
|
||||||
<!-- start item -->
|
<!-- start item -->
|
||||||
<tr class="{cycle values='blue1, blue2'}">
|
<tr class="{cycle values='blue1, blue2'}" id="scratchpad_item_{$i.id}">
|
||||||
<td><input type="checkbox" class="checkbox" name="{$i.id}"/></td>
|
<td><input type="checkbox" class="checkbox" name="{$i.id}"/></td>
|
||||||
<td {include file="scratchpad/actionhandler.tpl"} style="cursor: pointer">
|
<td {include file="scratchpad/actionhandler.tpl"} style="cursor: pointer">
|
||||||
{if $i.type|lower == "playlist"}
|
{if $i.type|lower == "playlist"}
|
||||||
|
@ -48,6 +48,61 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- end item -->
|
<!-- end item -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var tool_tip = $("<div class='sp_tool_tip'/>"),
|
||||||
|
tool_tip_content = $("<table/>"),
|
||||||
|
playlist_content = $("<table/>"),
|
||||||
|
title = "{$i.title}",
|
||||||
|
id = "{$i.id}",
|
||||||
|
type = "{$i.type}",
|
||||||
|
creator = "{$i.creator}",
|
||||||
|
duration = "{$i.duration}",
|
||||||
|
source = "{$i.source}",
|
||||||
|
bitRate = "{$i.bitRate}",
|
||||||
|
sampleRate = "{$i.sampleRate}",
|
||||||
|
content = "{$i.content}";
|
||||||
|
|
||||||
|
{literal}
|
||||||
|
|
||||||
|
tool_tip_content.append("<tr><td>Title: </td><td>"+title+"</td></tr>");
|
||||||
|
tool_tip_content.append("<tr><td>Creator: </td><td>"+creator+"</td></tr>");
|
||||||
|
|
||||||
|
if(type === "audioclip") {
|
||||||
|
tool_tip_content.append("<tr><td>Album: </td><td>"+source+"</td></tr>");
|
||||||
|
tool_tip_content.append("<tr><td>Bit Rate: </td><td>"+bitRate+"</td></tr>");
|
||||||
|
tool_tip_content.append("<tr><td>Sample Rate: </td><td>"+sampleRate+"</td></tr>");
|
||||||
|
}
|
||||||
|
|
||||||
|
tool_tip_content.append("<tr><td>Duration: </td><td>"+duration+"</td></tr>");
|
||||||
|
|
||||||
|
if(type === "playlist") {
|
||||||
|
content = content.split("/");
|
||||||
|
for(var i=0; i< content.length; i++){
|
||||||
|
playlist_content.append("<tr><td>" +content[i]+ "</td></tr>");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tool_tip.append(tool_tip_content);
|
||||||
|
tool_tip.append(playlist_content);
|
||||||
|
|
||||||
|
$("#scratchpad_item_"+id).qtip({
|
||||||
|
content: tool_tip,
|
||||||
|
style: {name: 'cream'},
|
||||||
|
position: {
|
||||||
|
corner: {
|
||||||
|
target: "rightMiddle",
|
||||||
|
tooltip: "leftMiddle"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
show: 'mouseover',
|
||||||
|
hide: 'mouseout'
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{/literal}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{else}
|
{else}
|
||||||
<tr class="blue1">
|
<tr class="blue1">
|
||||||
|
|
|
@ -529,13 +529,35 @@ class uiBase
|
||||||
public function getMetaInfo($id)
|
public function getMetaInfo($id)
|
||||||
{
|
{
|
||||||
$type = strtolower(GreenBox::getFileType($id));
|
$type = strtolower(GreenBox::getFileType($id));
|
||||||
|
|
||||||
|
if($type == 'playlist') {
|
||||||
|
require_once("../../../storageServer/var/Playlist.php");
|
||||||
|
|
||||||
|
$playList = new Playlist(GreenBox::GunidFromId($id));
|
||||||
|
$playListData = $playList->export();
|
||||||
|
|
||||||
|
for ($i = 1; $i < count($playListData); $i++) {
|
||||||
|
|
||||||
|
$entry = StoredFile::RecallByGunid($playListData["".$i]["gunid"]);
|
||||||
|
$playListEntries[] = $entry->getName();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$_SESSION['mdata'] = $playListEntries;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
$data = array('id' => $id,
|
$data = array('id' => $id,
|
||||||
'gunid' => BasicStor::GunidFromId($id),
|
'gunid' => BasicStor::GunidFromId($id),
|
||||||
'title' => $this->getMetadataValue($id, UI_MDATA_KEY_TITLE),
|
'title' => $this->getMetadataValue($id, UI_MDATA_KEY_TITLE),
|
||||||
'creator' => $this->getMetadataValue($id, UI_MDATA_KEY_CREATOR),
|
'creator' => $this->getMetadataValue($id, UI_MDATA_KEY_CREATOR),
|
||||||
'duration' => $this->getMetadataValue($id, UI_MDATA_KEY_DURATION),
|
'duration' => $this->getMetadataValue($id, UI_MDATA_KEY_DURATION),
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
#'isAvailable' => $type == 'playlist' ? $this->gb->playlistIsAvailable($id, $this->sessid) : NULL,
|
'source' => $type == 'audioclip' ? $this->getMetadataValue($id, UI_MDATA_KEY_SOURCE) : NULL,
|
||||||
|
'bitRate' => $type == 'audioclip' ? $this->getMetadataValue($id, UI_MDATA_KEY_BITRATE) : NULL,
|
||||||
|
'sampleRate' => $type == 'audioclip' ? $this->getMetadataValue($id, UI_MDATA_KEY_SAMPLERATE) : NULL,
|
||||||
|
//'isAvailable' => $type == 'playlist' ? $this->gb->playlistIsAvailable($id, $this->sessid) : NULL,
|
||||||
|
'content' => $type == 'playlist' ? join("/", $playListEntries) : NULL,
|
||||||
);
|
);
|
||||||
return ($data);
|
return ($data);
|
||||||
} // fn getMetaInfo
|
} // fn getMetaInfo
|
||||||
|
|
|
@ -60,6 +60,7 @@ define('UI_CALENDAR_SESSNAME', 'CALENDAR');
|
||||||
// Metadata Keys
|
// Metadata Keys
|
||||||
define('UI_MDATA_KEY_TITLE', 'dc:title');
|
define('UI_MDATA_KEY_TITLE', 'dc:title');
|
||||||
define('UI_MDATA_KEY_CREATOR', 'dc:creator');
|
define('UI_MDATA_KEY_CREATOR', 'dc:creator');
|
||||||
|
define('UI_MDATA_KEY_SOURCE', 'dc:source');
|
||||||
define('UI_MDATA_KEY_DURATION', 'dcterms:extent');
|
define('UI_MDATA_KEY_DURATION', 'dcterms:extent');
|
||||||
define('UI_MDATA_KEY_URL', 'ls:url');
|
define('UI_MDATA_KEY_URL', 'ls:url');
|
||||||
define('UI_MDATA_KEY_FORMAT', 'dc:format');
|
define('UI_MDATA_KEY_FORMAT', 'dc:format');
|
||||||
|
|
|
@ -1668,11 +1668,32 @@ class Transport
|
||||||
{
|
{
|
||||||
global $CC_CONFIG;
|
global $CC_CONFIG;
|
||||||
$xrp = XML_RPC_encode($pars);
|
$xrp = XML_RPC_encode($pars);
|
||||||
$path = $CC_CONFIG['archiveUrlPath']."/".$CC_CONFIG['archiveXMLRPC'];
|
|
||||||
$url = $CC_CONFIG["archiveUrlHost"].":".$CC_CONFIG["archiveUrlPort"]."/".$path;
|
$group = 'StationPrefs';
|
||||||
//echo $url."\n";
|
$key = 'archiveServerLocation';
|
||||||
$c = new XML_RPC_Client($path, $CC_CONFIG['archiveUrlHost'],
|
$archiveUrl = $pr->loadGroupPref(NULL/*sessid*/, $group, $key);
|
||||||
$CC_CONFIG['archiveUrlPort']);
|
|
||||||
|
if($archiveUrl){
|
||||||
|
|
||||||
|
$archiveUrlInfo = parse_url($archiveUrl);
|
||||||
|
|
||||||
|
if($archiveUrlInfo['port']){
|
||||||
|
$port = $archiveUrlInfo['port'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$port = 80;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$c = new XML_RPC_Client($archiveUrlInfo['path'], $archiveUrlInfo['host'], $port);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$c = new XML_RPC_Client(
|
||||||
|
$CC_CONFIG['archiveUrlPath']."/".$CC_CONFIG['archiveXMLRPC'],
|
||||||
|
$CC_CONFIG['archiveUrlHost'], $CC_CONFIG['archiveUrlPort']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$f = new XML_RPC_Message($method, array($xrp));
|
$f = new XML_RPC_Message($method, array($xrp));
|
||||||
$r = $c->send($f);
|
$r = $c->send($f);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
|
|
|
@ -64,7 +64,7 @@ if ($verbose) {
|
||||||
echo "Host: {$url['host']}, path: {$url['path']}\n";
|
echo "Host: {$url['host']}, path: {$url['path']}\n";
|
||||||
echo "Method: $method\n";
|
echo "Method: $method\n";
|
||||||
echo "Parameters:\n";
|
echo "Parameters:\n";
|
||||||
var_dump($options);
|
//var_dump($pars);
|
||||||
}
|
}
|
||||||
|
|
||||||
$infos = array(
|
$infos = array(
|
||||||
|
|
Loading…
Reference in New Issue