#2368 Show playlist title in the statusbar

This commit is contained in:
sebastian 2010-02-17 21:30:51 +00:00
parent 8e6d194395
commit 8231e0fdd5
4 changed files with 18 additions and 7 deletions

View File

@ -3,7 +3,7 @@
{literal}
// play-progress-bar object
function plPrBar(tit, pltit, eh, ei, es, dh, di, ds, next, ntit, nh, ni, ns){
function plPrBar(tit, eh, ei, es, dh, di, ds, next, ntit, nh, ni, ns, pltit){
this.tit = tit;
this.pltit = pltit;
this.next = next;
@ -82,7 +82,8 @@ function plPrBar_create(jscomRes) {
ppb = new plPrBar(parms[0],
parms[1], parms[2], parms[3],
parms[4], parms[5], parms[6],
parms[7], parms[8], parms[9], parms[10], parms[11]
parms[7], parms[8], parms[9], parms[10], parms[11],
parms[12]
);
ppb.init();
} else {
@ -102,7 +103,6 @@ function plPrBar_hide() {
{if (is_array($_nowplaying.duration))}
ppb = new plPrBar ("{$_nowplaying.title|escape:html}",
"{$_nowplaying.pl_title|escape:html}",
{$_nowplaying.elapsed.h|string_format:"%d"}, {$_nowplaying.elapsed.m|string_format:"%d"}, {$_nowplaying.elapsed.s|string_format:"%d"},
{$_nowplaying.duration.h|string_format:"%d"}, {$_nowplaying.duration.m|string_format:"%d"}, {$_nowplaying.duration.s|string_format:"%d"},
{if is_array($_nextplaying)}
@ -110,6 +110,7 @@ function plPrBar_hide() {
{else}
0, "", 0, 0, 0
{/if}
, "{$_nowplaying.playlist|escape:html}"
);
ppb.init();
{/if}

View File

@ -1,5 +1,5 @@
{assign var='_nowplaying' value=$SCHEDULER->getNowNextClip()}
{assign var='_nextplaying' value=$SCHEDULER->getNowNextClip()}
{assign var='_nextplaying' value=$SCHEDULER->getNowNextClip(1)}
<div id="masterpalette">
<table border="0" class="masterpalette">
@ -50,7 +50,9 @@
<div style="height:3px"> </div>
<div id="next_clip">
{if $_nextplaying}
<span class="next">##Next Clip##:</span> <strong id="next_title"></strong>&nbsp; <strong id="next_duration"></strong></div>
<span class="next">##Next Clip##:</span>
<strong id="next_title"></strong>
&nbsp;<span id="next_duration"></span>
{/if}
</div>
</div>

View File

@ -624,14 +624,13 @@ class uiScheduler extends uiCalendar {
$elapsed = array_map('round', $elapsed);
$remaining = array_map('round', $remaining);
$percentage = $secondsElapsed ? (100 * $secondsElapsed / ($secondsElapsed + $secondsRemaining)) : 100;
$pl_title = $this->Base->gb->getMetadataValue(BasicStor::IdFromGunid($pl['playlistId']), UI_MDATA_KEY_TITLE, $this->Base->sessid);
return array('title' => $clip['title'],
'duration' => $duration,
'elapsed' => $elapsed,
'remaining' => $remaining,
'percentage'=> $percentage,
'pl_title' => $pl_title
'playlist' => $clip['playlist']
);
} // fn getNowNextClip
@ -655,6 +654,7 @@ class uiScheduler extends uiCalendar {
'next.dur.h' => $next ? $next['duration']['h'] : 0,
'next.dur.m' => $next ? $next['duration']['m'] : 0,
'next.dur.s' => $next ? $next['duration']['s'] : 0,
'playlist' => $curr['playlist'],
);
} else {
return FALSE;

View File

@ -887,6 +887,14 @@ class GreenBox extends BasicStor {
if (!is_null($id)) {
$res['title'] = $this->bsGetMetadataValue($id, "dc:title");
}
$res['playlist_title'] = NULL;
$id = BasicStor::IdFromGunid($plid);
if (PEAR::isError($id)) {
return $id;
}
if (!is_null($id)) {
$res['playlist'] = $this->bsGetMetadataValue($id, "dc:title");
}
return $res;
} // fn displayPlaylistClipAtOffset