forked from hummypkg/webif
Correctly display minute/minutes
This commit is contained in:
parent
44c52143a7
commit
1d243c989b
@ -156,10 +156,14 @@ if {$type eq "ts"} {
|
||||
puts "<font class=also>(Scheduled: [clock format \
|
||||
[expr {[$ts get schedstart] + [$ts get scheddur]}] \
|
||||
-format "%c %Z"])</font>"
|
||||
set duration [$ts duration]
|
||||
set durmins [format "minute%s" $($duration == 1 ? "" : "s")]
|
||||
set resume [$ts get resume]
|
||||
set resmins [format "minute%s" $($resume == 1 ? "" : "s")]
|
||||
puts "</td>
|
||||
</tr><tr>
|
||||
<th>Duration</th>
|
||||
<td>[$ts duration] minute(s).
|
||||
<td>$duration $durmins.
|
||||
<font class=also>(Scheduled: [expr {[$ts get scheddur] / 60}])
|
||||
</font></td>
|
||||
</tr><tr>
|
||||
@ -167,8 +171,8 @@ if {$type eq "ts"} {
|
||||
<td>[$ts get status]</td>
|
||||
</tr><tr>
|
||||
<th>Resumes</th>
|
||||
<td>[expr {[$ts get resume] / 60}] minutes into recording.
|
||||
[progressbar $([$ts get resume] * 100 / [$ts duration 1])]
|
||||
<td>[expr {$resume / 60}] $resmins into recording.
|
||||
[progressbar $($resume * 100 / [$ts duration 1])]
|
||||
</td>
|
||||
</tr><tr>
|
||||
<th>Size</th>
|
||||
|
@ -33,7 +33,9 @@ puts {
|
||||
<fieldset class=cleft style="margin: 0 1em 1em 1em">
|
||||
<legend>VLC Player</legend>
|
||||
}
|
||||
puts "<span class=also>Now playing: $rfile, [$ts duration] minutes.</span>"
|
||||
set duration [$ts duration]
|
||||
set mins [format "minute%s" $($duration == 1 ? "" : "s")]
|
||||
puts "<span class=also>Now playing: $rfile, $duration $mins.</span>"
|
||||
puts {
|
||||
<div id=vlc></div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user