Resync master from hummypkg/webif:master

Reviewed-on: #4
This commit is contained in:
df 2020-07-14 11:49:50 +00:00
commit 2d06ec7811
4 changed files with 37 additions and 19 deletions

View File

@ -1,10 +1,10 @@
Package: webif
Priority: optional
Section: web
Version: 1.4.8-3
Version: 1.4.8-9
Architecture: mipsel
Maintainer: af123@hpkg.tv
Depends: tcpfix,webif-channelicons(>=1.1.27),lighttpd(>=1.4.39-1),jim(>=0.79),jim-pack(>=0.79),jim-oo(>=0.77),jim-sqlite3(>=0.77),jim-cgi(>=0.7-2),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.8),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.12-1),webif-charts(>=1.2-1),stripts(>=1.4.2),tmenu(>=1.21-2),ffmpeg(>=2.8),id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.98),sqlite3(>=3.15.1),jim-xconv,zip(>=3.0-1),wget
Depends: tcpfix,webif-channelicons(>=1.1.27),lighttpd(>=1.4.39-1),jim(>=0.79),jim-pack(>=0.79),jim-oo(>=0.77),jim-sqlite3(>=0.77),jim-cgi(>=0.7-2),jim-binary(>=0.76),service-control(>=2.3),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.2.8),hmt(>=2.0.10),ssmtp,cron-daemon(>=1.18.3-3),at(>=3.1.18),anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.1.13),webif-charts(>=1.2-1),stripts(>=1.4.2),tmenu(>=1.21-2),ffmpeg(>=2.8),id3v2,multienv(>=1.6),tcpping(>=1.1),e2fsprogs,wireless-tools(>=29-1),dbupdate,recmon(>=2.0.7),hwctl,nugget(>=0.98),sqlite3(>=3.15.1),jim-xconv,zip(>=3.0-1),wget
Suggests:
Description: An evolving web interface for the Humax.
Tags: https://hummy.tv/forum/threads/7712/

View File

@ -292,7 +292,7 @@ if {$parent ne ""} {
"
}
proc s_time {a b} {
proc s_file_stat {a b attr} {
global dir
set a "$dir/$a"
@ -310,19 +310,29 @@ proc s_time {a b} {
}
if {[catch {file stat $a l}]} { return 0}
set at $l(mtime)
set at $l($attr)
if {[catch {file stat $b l}]} { return 0}
set bt $l(mtime)
set bt $l($attr)
if {$at < $bt} { return -1 }
if {$at > $bt} { return 1 }
return 0
}
proc s_time {a b} {
tailcall s_file_stat $a $b mtime
}
proc s_size {a b} {
tailcall s_file_stat $a $b size
}
set files [readdir -nocomplain $dir]
switch $order {
1 { set files [lsort -command s_time $files] }
2 { set files [lreverse [lsort -command s_time $files]] }
3 { set files [lsort -command s_size $files] }
4 { set files [lreverse [lsort -command s_size $files]] }
default { set files [lsort -nocase $files] }
}
@ -337,22 +347,30 @@ Directories: $dircount, Files: $filecount
# Sort icons
puts "<div id=sortdiv>"
set sortlist {{0 sort_name name} {1 sort_date date} {2 sort_date reverse-date}}
set sortlist {
{0 sort_name name {Alphabetical order A->Z}}
{1 sort_date date {Oldest first}}
{2 sort_date reverse-date {Newest first}}
{3 sort_size size {Smallest first}}
{4 sort_size reverse-size {Largest first}}}
puts "
Sort by: "
foreach sl $sortlist {
lassign $sl index img descr
lassign $sl index img descr tt
if {$index} { puts " | " }
set tag "Currently sorting"
set tag " (current)"
if {$order != $index} {
puts "
<a href=\"$env(SCRIPT_NAME)?$env(QUERY_STRING)&order=$index\">"
set tag "Sort"
}
puts "<img class=va border=0 src=/img/$img.gif> $tag by $descr"
if {$order != $index} {
puts "</a>"
set qs [regsub -all {&order=[[[:digit:]]+} $env(QUERY_STRING) ""]
puts "<a href=\"$env(SCRIPT_NAME)?$qs&order=$index\" title=\"$tt\">"
set tag ""
set ket "a"
} else {
puts "<span title=\"$tt\">"
set ket "span"
}
puts "<img class=va border=0 src=/img/$img.gif> $descr$tag</$ket>"
}
puts "</div>"

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

View File

@ -360,7 +360,7 @@ rsv method update_aul {new_event old_aul} {
set end [$new_event end]
set evtid [$new_event get event_id]
set evtaul [list $service_id $start $end $evtid]
set evtcrid [string toupper
set evtcrid [string toupper \
"1[$new_event get channel_crid][$new_event get event_crid]"]
set insert 0
}
@ -587,8 +587,8 @@ rsv method fix_hsvc {} {
}
proc {rsv find_hsvc} {lcn channel} {
set c [svc channel $szSvcName]
if {$c == 0} { set c [svc load usLcn $usLcn] }
set c [svc channel $channel]
if {$c == 0} { set c [svc load usLcn $lcn] }
if {$c == 0} { return 0 }
return [$c get hSvc]
}