mirror of
https://github.com/timendum/Youtube-dl-WebUI.git
synced 2025-02-28 23:53:10 +08:00
print last line of log
This commit is contained in:
parent
ea5f79737e
commit
1f736ea940
2 changed files with 3 additions and 1 deletions
|
@ -55,8 +55,10 @@ class FileHandler
|
|||
|
||||
try {
|
||||
$lines = explode("\r", file_get_contents($file));
|
||||
$content["lastline"] = array_slice($lines, -1)[0];
|
||||
$content["100"] = strpos($lines[count($lines)-1], ' 100% of ') > 0;
|
||||
} catch (Exception $e) {
|
||||
$content["lastline"] = '';
|
||||
$content["100"] = False;
|
||||
}
|
||||
try {
|
||||
|
|
2
logs.php
2
logs.php
|
@ -43,7 +43,7 @@
|
|||
foreach($files as $f)
|
||||
{
|
||||
echo "<tr>";
|
||||
echo "<td><a href=\"".rawurlencode($file->get_logs_folder()).'/'.rawurlencode($f["name"])."\" target=\"_blank\">".$f["name"]."</a></td>";
|
||||
echo "<td><div><a href=\"".rawurlencode($file->get_logs_folder()).'/'.rawurlencode($f["name"])."\" target=\"_blank\">".$f["name"]."</a></div><div>".$f["lastline"]."</div></td>";
|
||||
echo "<td>".($f["ended"] ? '✓' : '')."</td>";
|
||||
echo "<td>".($f["100"] ? '✓' : '')."</td>";
|
||||
echo "<td>".$f["size"]."</td>";
|
||||
|
|
Loading…
Reference in a new issue