From 4194bf627c50c17b5ff6704e1b58735943fc8d69 Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Wed, 3 Jun 2020 13:12:53 +0100 Subject: [PATCH 01/12] Increase rsvsync dependency --- CONTROL/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTROL/control b/CONTROL/control index c1be203..7e09345 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -4,7 +4,7 @@ Section: web Version: 1.4.8-3 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/ -- 2.44.0 From 3b7a573600957981553b58a7d1c593bfe2c6f59d Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Sat, 6 Jun 2020 22:23:11 +0100 Subject: [PATCH 02/12] Bump version --- CONTROL/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTROL/control b/CONTROL/control index 7e09345..832c014 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.4.8-3 +Version: 1.4.8-4 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.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 -- 2.44.0 From c1bc10eca8547c86793fb42032cee2c5bdd3e302 Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Sun, 14 Jun 2020 13:40:38 +0100 Subject: [PATCH 03/12] Fix schedule restore --- CONTROL/control | 2 +- webif/lib/rsv.class | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index 832c014..1e04f7d 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.4.8-4 +Version: 1.4.8-5 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.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 diff --git a/webif/lib/rsv.class b/webif/lib/rsv.class index 65e3f57..3fbbafe 100644 --- a/webif/lib/rsv.class +++ b/webif/lib/rsv.class @@ -587,7 +587,7 @@ rsv method fix_hsvc {} { } proc {rsv find_hsvc} {lcn channel} { - set c [svc channel $szSvcName] + set c [svc channel $channel] if {$c == 0} { set c [svc load usLcn $usLcn] } if {$c == 0} { return 0 } return [$c get hSvc] -- 2.44.0 From abf121bba4a41d5a1032b3fd69ed280f87a23951 Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Sun, 14 Jun 2020 14:24:10 +0100 Subject: [PATCH 04/12] Fix rsv::find_hsvc by channel --- CONTROL/control | 2 +- webif/lib/rsv.class | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index 1e04f7d..a4e847f 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.4.8-5 +Version: 1.4.8-7 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.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 diff --git a/webif/lib/rsv.class b/webif/lib/rsv.class index 3fbbafe..23f1486 100644 --- a/webif/lib/rsv.class +++ b/webif/lib/rsv.class @@ -588,7 +588,7 @@ rsv method fix_hsvc {} { proc {rsv find_hsvc} {lcn channel} { set c [svc channel $channel] - if {$c == 0} { set c [svc load usLcn $usLcn] } + if {$c == 0} { set c [svc load usLcn $lcn] } if {$c == 0} { return 0 } return [$c get hSvc] } -- 2.44.0 From 4b3efc2e7241fb9cff36e74b275d6513938fd08d Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Tue, 16 Jun 2020 10:52:14 +0100 Subject: [PATCH 05/12] Fix missing continuation --- CONTROL/control | 2 +- webif/lib/rsv.class | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index a4e847f..3ed5c1a 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.4.8-7 +Version: 1.4.8-8 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.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 diff --git a/webif/lib/rsv.class b/webif/lib/rsv.class index 23f1486..77ec7bd 100644 --- a/webif/lib/rsv.class +++ b/webif/lib/rsv.class @@ -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 } -- 2.44.0 From b824882eb25d5a55906dd6a4f89c4bf8cb953bd0 Mon Sep 17 00:00:00 2001 From: df Date: Sun, 14 Jun 2020 23:49:13 +0000 Subject: [PATCH 06/12] Add sort by size Implementing https://hummy.tv/forum/threads/webif-web-interface-1-4-x.7712/post-142116. The sort line is reorganised to allow for two more sort orders. --- webif/html/browse/index.jim | 46 +++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/webif/html/browse/index.jim b/webif/html/browse/index.jim index 762a1c7..669831e 100755 --- a/webif/html/browse/index.jim +++ b/webif/html/browse/index.jim @@ -319,10 +319,39 @@ proc s_time {a b} { return 0 } +proc s_size {a b} { + global dir + + set a "$dir/$a" + set b "$dir/$b" + + set ad [file isdirectory $a] + set bd [file isdirectory $b] + + if {$ad && !$bd} { return -1 } + if {$bd && !$ad} { return 1 } + if {$ad && $bd} { + if {$a < $b} { return -1 } + if {$a > $b} { return 1 } + return 0 + } + + if {[catch {file stat $a l}]} { return 0} + set as $l(size) + if {[catch {file stat $b l}]} { return 0} + set bs $l(size) + + if {$as < $bs} { return -1 } + if {$as > $bs} { return 1 } + return 0 +} + 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,19 +366,23 @@ Directories: $dircount, Files: $filecount # Sort icons puts "
" -set sortlist {{0 sort_name name} {1 sort_date date} {2 sort_date reverse-date}} +set sortlist { + {0 sort_name name} + {1 sort_date date} {2 sort_date reverse-date} + {3 sort_size size} {4 sort_size reverse-size}} +puts " +Sort by: " foreach sl $sortlist { lassign $sl index img descr if {$index} { puts " | " } - set tag "Currently sorting" + set tag " (current)" if {$order != $index} { - puts " - " - set tag "Sort" + puts "" + set tag "" } - puts " $tag by $descr" + puts " $descr$tag" if {$order != $index} { puts "" } @@ -443,4 +476,3 @@ if {[llength $plugins(buttons)]} { puts "
" footer - -- 2.44.0 From 478d9db2e2ff33d1e7a46ebef3807fdc183167cb Mon Sep 17 00:00:00 2001 From: df Date: Mon, 15 Jun 2020 02:47:06 +0000 Subject: [PATCH 07/12] Add sort by size (icon) --- webif/html/img/sort-size.png/sort_size.gif | Bin 0 -> 618 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 webif/html/img/sort-size.png/sort_size.gif diff --git a/webif/html/img/sort-size.png/sort_size.gif b/webif/html/img/sort-size.png/sort_size.gif new file mode 100644 index 0000000000000000000000000000000000000000..d5fbda59995752ee7daa7811b307b4c035a9a362 GIT binary patch literal 618 zcmZ?wbhEHb6krfwIF`(yYG|isWT$Ryr)lb7VC`mN?`iJjo19yomS2@xP?b?!mtESJ zSJ7Nh)m~iJRod8F(L6D-^FUSGq^h>bRqc~&I;M7XbaZ!jH}%fy>FMe1?d|XHPnmu? zZThK+6DOw6I6Z07q^VPCcG{=({T}ym|BSYC-C4{E+g!}sh%}WyEPl`=SbhUNXl(CFok;KoJ6qDp) Date: Mon, 15 Jun 2020 03:31:28 +0000 Subject: [PATCH 08/12] Avoid sort order build-up in sort URL parameter string Fixes behaviour where each new sort added &order=n to the query string. --- webif/html/browse/index.jim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webif/html/browse/index.jim b/webif/html/browse/index.jim index 669831e..a1b60be 100755 --- a/webif/html/browse/index.jim +++ b/webif/html/browse/index.jim @@ -379,7 +379,8 @@ foreach sl $sortlist { set tag " (current)" if {$order != $index} { - puts "" + set qs [regsub -all {&order=[[[:digit:]]+} $env(QUERY_STRING) ""] + puts "" set tag "" } puts " $descr$tag" -- 2.44.0 From 42cf8bf238f5408e82a07652f78ff29e661eb387 Mon Sep 17 00:00:00 2001 From: df Date: Tue, 16 Jun 2020 04:12:08 +0000 Subject: [PATCH 09/12] Add tooltips for sort orders Also generalise the file sort function to allow sorting by any quantity returned by `[file stat]` --- webif/html/browse/index.jim | 54 +++++++++++++------------------------ 1 file changed, 18 insertions(+), 36 deletions(-) diff --git a/webif/html/browse/index.jim b/webif/html/browse/index.jim index a1b60be..d10aa01 100755 --- a/webif/html/browse/index.jim +++ b/webif/html/browse/index.jim @@ -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,40 +310,21 @@ 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} { - global dir - - set a "$dir/$a" - set b "$dir/$b" - - set ad [file isdirectory $a] - set bd [file isdirectory $b] - - if {$ad && !$bd} { return -1 } - if {$bd && !$ad} { return 1 } - if {$ad && $bd} { - if {$a < $b} { return -1 } - if {$a > $b} { return 1 } - return 0 - } - - if {[catch {file stat $a l}]} { return 0} - set as $l(size) - if {[catch {file stat $b l}]} { return 0} - set bs $l(size) - - if {$as < $bs} { return -1 } - if {$as > $bs} { return 1 } - return 0 + tailcall s_file_stat $a $b size } set files [readdir -nocomplain $dir] @@ -367,26 +348,27 @@ Directories: $dircount, Files: $filecount # Sort icons puts "" -- 2.44.0 From 0ef47da7b6e20728f8e3ac429366c40c380addf2 Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Thu, 18 Jun 2020 00:57:22 +0100 Subject: [PATCH 10/12] Remove trailing whitespace, restore last blank line --- webif/html/browse/index.jim | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/webif/html/browse/index.jim b/webif/html/browse/index.jim index d10aa01..9c27973 100755 --- a/webif/html/browse/index.jim +++ b/webif/html/browse/index.jim @@ -104,7 +104,7 @@ set filecount 0 proc entry {file} {{i 0}} { global dircount filecount dinuse - + set bfile [file tail $file] regsub -all " +" $bfile "" tbfile if {[string index $bfile 0] == "\025"} { @@ -320,7 +320,7 @@ proc s_file_stat {a b attr} { } proc s_time {a b} { - tailcall s_file_stat $a $b mtime + tailcall s_file_stat $a $b mtime } proc s_size {a b} { @@ -348,9 +348,11 @@ Directories: $dircount, Files: $filecount # Sort icons puts "
" 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}}} + {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 { @@ -368,7 +370,7 @@ foreach sl $sortlist { puts "" set ket "span" } - puts " $descr$tag" + puts " $descr$tag" } puts "
" @@ -459,3 +461,4 @@ if {[llength $plugins(buttons)]} { puts "" footer + -- 2.44.0 From cbc62f4903ea97aae31052864a29104c3cd341f9 Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Thu, 18 Jun 2020 00:58:55 +0100 Subject: [PATCH 11/12] Update version --- CONTROL/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTROL/control b/CONTROL/control index 3ed5c1a..04c00ae 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.4.8-8 +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.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 -- 2.44.0 From 1994d99294c53a6663b22a4542d1f5261cc979fa Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Thu, 18 Jun 2020 01:05:28 +0100 Subject: [PATCH 12/12] Relocate sort_size.gif --- webif/html/img/{sort-size.png => }/sort_size.gif | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename webif/html/img/{sort-size.png => }/sort_size.gif (100%) diff --git a/webif/html/img/sort-size.png/sort_size.gif b/webif/html/img/sort_size.gif similarity index 100% rename from webif/html/img/sort-size.png/sort_size.gif rename to webif/html/img/sort_size.gif -- 2.44.0