[WebIF] Feature Requests

WebIf >>
1.Browse >> multiple file select -> option -> Mark as New
2.Browse >> Select file/s to clear error flags
3.Browse >> Make Opt+ >> "Set Thumbnail" work faster (especially for HD recordings, 'cos man!)
4.Browse >> Ability to stop ad-detection during active processing
5.EPG >> Ability to select Favourite list from here
6.Packages >> have a consistent URL link on each package to package information or recent update
7.Some place to directly edit favourites. Currenly I edit via the Remote control: Menu>>Settings>>Edit Channels>>
 
Last edited:
3.Browse >> Make Opt+ >> "Set Thumbnail" work faster (especially for HD recordings, 'cos man!)
How? The video has to be decoded in software (ffmpeg, presuming it has been decrypted), and that is obviously very hard going for HiDef. It's bloody amazing the HDR-FOX processor/memory can do it at all! There is no means to utilise the hardware video decoder pipeline which outputs to HDMI.

4.Browse >> Ability to stop ad-detection during active processing
That sounds like my previous request to provide an abort for queued processes.

6.Packages >> have a consistent URL link on each package to package information or recent update
Are you volunteering to create the catalogue and maintain it?

I presume you mean the file extension by "File Type".
The sorting is implemented in /mod/webif/html/browse/index.jim and the documentation is here: https://jim.tcl.tk/fossil/doc/trunk/Tcl_shipped.html#_file
Yes, file extension*. Implemented perhaps, but not exposed on the user interface. Does that mean I should expose it myself by customising the CSS or something?

* My use-case (ugh!) is to separate the original .ts from .mp3 conversions in the listing, although this is less useful than I first thought without a group-select ability.
 
Implemented perhaps, but not exposed on the user interface.
It's not implemented. The hint was to look at line 300+ to see how the existing sorts were implemented and then to do so for the one you wanted using the Jim manual reference to teach yourself.
Does that mean I should expose it myself by customising the CSS or something?
No.
although this is less useful than I first thought without a group-select ability.
This is probably fairly easily done in Javascript, but I don't have much knowledge.
1.Browse >> multiple file select -> option -> Mark as New
2.Browse >> Select file/s to clear error flags
Yes, I would probably find those useful too. I have had to resort to the command line and the hmt utility to do it twice in the last week or so.
3-6: As BH said.
 
Are you volunteering to create the catalogue and maintain it?
Sorry!

Just responding to the [WebIF] Feature Requests posting.
I've little idea of what's involved in maintaining this customisation, but I do appreciate it.

On this point for example; a recent WebIf update linked to an old posting entry. Looked to the latest entry, but I still cold not work put what had been changed.
 
a recent WebIf update linked to an old posting entry
That's a chicken/egg problem.
I've little idea of what's involved in maintaining this customisation
It's a lot of work, especially when it goes awry for whatever reason and, as you can probably tell, there aren't many people doing it. Then there are the misery-guts to deal with (you may be able to tell who they are), who are great de-motivators if ever there were any.
 
I think I did the last sort update.

This is the necessary patch against webif-1.5.1-4 (also clearing unwanted trailing white space):
Code:
--- old/webif/html/browse/index.jim
+++ new/webif/html/browse/index.jim
@@ -142,7 +142,7 @@
 		if {[$ts get definition] eq ""} {
 	        set type gen
 	        set ts 0
-			set img Video_Other                                    
+			set img Video_Other
 			set omenu oopt
 		} else {
 			set omenu opt
@@ -338,12 +338,19 @@
 	tailcall s_file_stat $a $b size
 }
 
+proc s_ext {a b} {
+	set at [file extension $a]
+	set bt [file extension $b]
+	return [string compare -nocase $at $bt]
+}
+
 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]] }
+	5 {		set files [lsort -command s_ext $files] }
 	default {	set files [lsort -nocase $files] }
 }
 
@@ -363,7 +370,8 @@
 	{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}}}
+	{4 sort_size reverse-size {Largest first}}
+	{5 sort_type type {Type A->Z}}}
 puts "
 Sort by: "
 foreach sl $sortlist {
An icon file webif/html/img/sort_type.gif is also needed, as attached.

If anyone wants to add other sorts (though the window width is limited): to sort by an attribute that's returned by file stat ..., copy the scheme used for size; otherwise copy the scheme from this patch.
 

Attachments

  • sort_type.gif
    sort_type.gif
    225 bytes · Views: 1
Last edited:
I've incorporated this and tweaked it a little to maintain sort orders of files and folders - one of the things that always irritated about the reverse-sort options.
This update to the WebIf is now available as a Beta package for anyone who cares to try it.
 
Updated and had a go - seems to do the extension sort fine. Not sure if you want anything else tested - I went through all the sort options and no problems for me.
 
Yes.

This sort of strategy might work.
1. Add plugin (it's obsolete, but matches the jQuery installation that we use) to webif.
2. Modify file browser JS check/uncheck handling to update a list of checked files in browser client local storage, using the plugin.
3. Modify file browser JS load routine to fetch the list of checked files from browser client local storage using the plugin and re-check any item that is still shown (or forget any check for a missing item).

From a brief review of the docs, the plugin needs the browser to support the JS local storage API, or otherwise you can install a cookie plugin and that will be used to emulate local storage. But we probably wouldn't care if the new functionality went missing on old browsers (IE<8, Safari<3.1, FF<3.5) as long as it didn't crash.
 
Remove "New" flag when playing programme on computer via webif

I watch some series that are not of interest to SWMBO on my computer but can lose track where I am in the series so it would be nice if the New flag was automatically removed when selecting the Play button on the webif in the same way it is when playing on the TV.

I don't think it would be possible to reliably detect playing and remove the flag when playing the recording directly via a UPNP media player - the Status display is sometimes inaccurate.
 
Back
Top