CC-1616, CC-406. If an audio file is 1 hour+ in length the time is now displayed properly in the UI. Active playlists can now be searched/browsed for. (editing:) in the creator field next too the creator of the playlist shows which user is currently modifying the playlist.
This commit is contained in:
parent
a674aee3b9
commit
aca88f8c48
|
@ -31,12 +31,22 @@
|
||||||
{$i.title|truncate:30:"...":true}
|
{$i.title|truncate:30:"...":true}
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
<td {include file=$action_handler} style="cursor: pointer">{$i.creator}</td>
|
<td {include file=$action_handler} style="cursor: pointer">
|
||||||
|
{$i.creator}
|
||||||
|
{if $PL->isAvailable($i.id) == false}
|
||||||
|
(editing: {$PL->isUsedBy($i.id)})
|
||||||
|
{/if}
|
||||||
|
</td>
|
||||||
<td {include file=$action_handler} style="cursor: pointer">{$i.source}</td>
|
<td {include file=$action_handler} style="cursor: pointer">{$i.source}</td>
|
||||||
<td {include file=$action_handler} style="cursor: pointer" align="center">{$i.track_num}</td>
|
<td {include file=$action_handler} style="cursor: pointer" align="center">{$i.track_num}</td>
|
||||||
<td {include file=$action_handler} style="text-align: right; cursor: pointer">{assign var="_duration" value=$i.duration}{niceTime in=$_duration}</td>
|
<td {include file=$action_handler} style="text-align: right; cursor: pointer">{assign var="_duration" value=$i.duration}{niceTime in=$_duration}</td>
|
||||||
<td {include file=$action_handler} style="border: 0; text-align: center; cursor: pointer">
|
<td {include file=$action_handler} style="border: 0; text-align: center; cursor: pointer">
|
||||||
<img src="img/{$i.type|lower}.png" border="0" alt="{$i.type|lower|capitalize}" {* include file="sub/alttext.tpl" *} />
|
{if $PL->isAvailable($i.id) == false}
|
||||||
|
<div align="left"><img src="img/ico_lock.png">
|
||||||
|
<img src="img/{$i.type|lower}.png" border="0" alt="{$i.type|lower|capitalize}" {* include file="sub/alttext.tpl" *} /></div>
|
||||||
|
{else}
|
||||||
|
<img src="img/{$i.type|lower}.png" border="0" alt="{$i.type|lower|capitalize}" {* include file="sub/alttext.tpl" *} />
|
||||||
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- end item -->
|
<!-- end item -->
|
||||||
|
|
|
@ -130,8 +130,15 @@ function S_niceTime($param)
|
||||||
require_once("../../../storageServer/var/Playlist.php");
|
require_once("../../../storageServer/var/Playlist.php");
|
||||||
|
|
||||||
$sec = round(Playlist::playlistTimeToSeconds($param['in']));
|
$sec = round(Playlist::playlistTimeToSeconds($param['in']));
|
||||||
$formatted = isset($param['all']) && $sec >= 3600 ? strftime('%H:%M:%S', $sec) : strftime(' %M:%S', $sec);
|
|
||||||
|
$hours = $sec / 3600;
|
||||||
|
$mins = ($sec % 3600) / 60;
|
||||||
|
$secs = (($sec % 3600) % 60);
|
||||||
|
|
||||||
|
if(intval($hours))
|
||||||
|
return sprintf("%02d:%02d:%02d", $hours, $mins, $secs);
|
||||||
|
else
|
||||||
|
return sprintf("%02d:%02d", $mins, $secs);
|
||||||
|
|
||||||
return $formatted;
|
|
||||||
} // fn S_niceTime
|
} // fn S_niceTime
|
||||||
?>
|
?>
|
|
@ -433,7 +433,7 @@ class DataEngine {
|
||||||
$fldsPart = "DISTINCT f.gunid, f.ftype, f.id ";
|
$fldsPart = "DISTINCT f.gunid, f.ftype, f.id ";
|
||||||
}
|
}
|
||||||
|
|
||||||
$fileCond = "f.state='ready'";
|
$fileCond = "(f.state='ready' OR f.state='edited')";
|
||||||
if (!is_null($filetype)) {
|
if (!is_null($filetype)) {
|
||||||
$fileCond .= " AND f.ftype='$filetype'";
|
$fileCond .= " AND f.ftype='$filetype'";
|
||||||
}
|
}
|
||||||
|
@ -442,7 +442,7 @@ class DataEngine {
|
||||||
} else {
|
} else {
|
||||||
$sql = $this->_makeOrSql($fldsPart, $whereArr, $fileCond, false);
|
$sql = $this->_makeOrSql($fldsPart, $whereArr, $fileCond, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// the actual values to fetch
|
// the actual values to fetch
|
||||||
if ($orderby) {
|
if ($orderby) {
|
||||||
$tmpSql = "SELECT to_hex(sq2.gunid)as gunid, sq2.ftype, sq2.id";
|
$tmpSql = "SELECT to_hex(sq2.gunid)as gunid, sq2.ftype, sq2.id";
|
||||||
|
@ -466,7 +466,7 @@ class DataEngine {
|
||||||
"ORDER BY ".join(",", $orderBySql)."\n";
|
"ORDER BY ".join(",", $orderBySql)."\n";
|
||||||
$sql = $tmpSql;
|
$sql = $tmpSql;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the number of results
|
// Get the number of results
|
||||||
$cnt = $this->_getNumRows($sql);
|
$cnt = $this->_getNumRows($sql);
|
||||||
if (PEAR::isError($cnt)) {
|
if (PEAR::isError($cnt)) {
|
||||||
|
@ -586,7 +586,7 @@ class DataEngine {
|
||||||
$whereArr = $this->_makeWhereArr($conditions);
|
$whereArr = $this->_makeWhereArr($conditions);
|
||||||
|
|
||||||
$fldsPart = "DISTINCT br.object as txt";
|
$fldsPart = "DISTINCT br.object as txt";
|
||||||
$fileCond = "f.state='ready'";
|
$fileCond = "(f.state='ready' OR f.state='edited')";
|
||||||
if (!is_null($filetype)) {
|
if (!is_null($filetype)) {
|
||||||
$fileCond .= " AND f.ftype='$filetype'";
|
$fileCond .= " AND f.ftype='$filetype'";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue