RS feature request

peterworks

Ye Olde Bowler
Would it be possible to put a drop down box on the EPG page to allow a different favourite to be displayed ? 🙏 I know I can do it via Settings but would find this much more convenient.
Thank you
 
I`ve already done this for the webif, not yet posted solution though as intended to do it with the others in the thread https://hummy.tv/forum/threads/webif-tweaks-changes-to-the-epg.9039/

but the change is pretty straightforward:

Code:
--- epg_search_orig    2019-01-05 14:15:39.161805600 +0000
+++ epg_search    2019-01-18 20:14:31.984318400 +0000
@@ -7,6 +7,40 @@
</style>
}

+puts -nonewline "<script type=text/javascript src=\"/lib/jquery.plugin/form/jquery.form.js\"></script>"
+
+set setclass [settings new]
+set favgrp [$setclass channel_group]
+
+puts "
+    <table style=\"float:right; margin: 16px 10px 0 -405px;\"><tr>
+    <form class=chgroup id=channel_group method=get action=\"/settings/settings.jim\">
+        <th class=key style=\"font-weight: normal;font-size:12px;\">Channel Group for EPG</th>
+        <td><fieldset><select id=channel_group name=channel_group
+            class=\"text ui-widget-content ui-corner-all\" onchange=\"FormSubmit(this.form)\">
+"
+
+set i 0
+puts "<option value=0>-- None --"
+foreach grp [$setclass channel_groups] {
+    incr i
+    puts -nonewline "<option value=$i"
+    if {$favgrp == $i} {
+        puts -nonewline " selected"
+    }
+    puts ">$grp"
+}
+
+puts "
+        </select>
+        <input type=checkbox name=reload id=reload checked class=hidden> Reload
+        <label id=reloadLabel for=reload>&nbsp;</label>
+        </fieldset>      
+        </td>
+    </form>
+    </tr><tr><td colspan=2 style=\"text-align: center;\"><div id=channel_group_output></div></td></tr></table>
+"
+
set searchterm ""
catch { set searchterm [dict get $_cgi term] }
set searchfull 0
@@ -122,6 +156,30 @@
         $('#morebutton').attr('src', '/img/more_show.png');
});

+$("#reload").change(function(){
+      if($(this).is(":checked")) $(this).next("label").css('background-image','url("/img/on.png")');
+      else $(this).next("label").css('background-image','url("/img/off.png")');
+});
+
+function FormSubmit(e) {
+     var id = $(e).attr('id');
+     var output = '#' + id + '_output';
+     $.ajax({
+        data: $(e).serialize(),
+        type: $(e).attr('method'),
+        url: $(e).attr('action'),
+        success: function (data) {
+        $(output)
+        .css({'marginTop':'5px','font-style':'italic'})
+        .show('slow')
+        .html(data)
+        .delay(3000)
+        .fadeOut('slow');
+    if ($('#reload').prop('checked'))  
+    setTimeout(function() { location.reload();}, 2500);
+        }
+    });
+}
</script>
}
Code:
--- styleOrig.css    2018-12-07 01:05:59.000000000 +0000
+++ style.css    2019-01-14 14:55:58.615498800 +0000

@@ -696,3 +696,50 @@
     color: #008080;
 }
 

+label#reloadLabel {
+    height: 22px;
+    width: 70px;
+    background-image: url("/img/on.png");
+    display: inline-block;
+    background-size: cover;
+}
favchoose.png
 
Last edited:
Can you or some other kind soul tell me the file(s) I need to update with this code. I retired long before CSS came along so I do need an amount of hand holding :(
Thank you
 
Can you or some other kind soul tell me the file(s) I need to update with this code. I retired long before CSS came along so I do need an amount of hand holding :(

Hmm. epg_search is easy enough, but which style.css? ./mnt/hd2/mod/webif/html/xepg/style.css I imagine.

Code:
HDRFOX1# find -name "epg_search"                                                                  
./mnt/hd2/mod/webif/lib/epg_search                                                                

HDRFOX1# find -name "style.css"                                                                   
./mnt/hd2/mod/cfupdater/tmp_root/var/bootstrap/style.css                                          
./mnt/hd2/mod/webif/html/sched/list/style.css                                                     
./mnt/hd2/mod/webif/html/sched/visual/style.css                                                   
./mnt/hd2/mod/webif/html/pkg/style.css                                                            
./mnt/hd2/mod/webif/html/restart/style.css                                                        
./mnt/hd2/mod/webif/html/browse/crop/style.css                                                    
./mnt/hd2/mod/webif/html/browse/tvdb/style.css                                                    
./mnt/hd2/mod/webif/html/browse/bookmarks/style.css                                               
./mnt/hd2/mod/webif/html/browse/style.css                                                         
./mnt/hd2/mod/webif/html/css/style.css                                                            
./mnt/hd2/mod/webif/html/settings/style.css                                                       
./mnt/hd2/mod/webif/html/log/style.css                                                            
./mnt/hd2/mod/webif/html/m/style.css                                                              
./mnt/hd2/mod/webif/html/xepg/style.css                                                           
./mnt/hd2/mod/webif/html/diag/style.css                                                           
./mnt/hd2/mod/webif/html/diag/queue/style.css                                                     
./mnt/hd2/mod/webif/html/diag/dspace/style.css                                                    
./mnt/hd2/mod/webif/html/edit/style.css                                                           
./mnt/hd2/mod/webif/plugin/sysmon/style.css                                                       
./mnt/hd2/mod/webif/plugin/qtube/style.css                                                        
./mnt/hd2/mod/webif/plugin/ir/style.css                                                           
./mnt/hd2/mod/webif/plugin/ir/m/style.css                                                         
./mnt/hd2/mod/webif/plugin/sidecar/web/style.css                                                  
./mnt/hd2/mod/webif/plugin/sweeper/style.css                                                      
./mnt/hd2/mod/webif/plugin/webshell/style.css                                                     
./var/bootstrap/style.cs

Once the correct file has been identified, you can either edit manually:

WebIF >> Diagnostics >> File Editor >> Open

...or use the patch command to incorporate the diffs automagically. Either way, make a backup first!
 
but which style.css? ./mnt/hd2/mod/webif/html/xepg/style.css I imagine.
Yes, which indeed. It's not the one you imagine, given the posted diff.
If someone can work it out then it can get incorporated properly.
will this do it ? 'patch -pnum <patchfile'
Yes, probably with -p0 as there is no path information. If you have the proper gnupatch package installed, then you can use the --dry-run option as well on a first run to test what would happen.
 
Thanks all - I am out this pm but will have a try (definitely doing a backup first) later today hopefully.
 
Failed at the first hurdle.
I created stylecss.txt and copied the code into it. I then copied it to the same folder style.css is in.
I ran the patch command and had the following:

Capture 27-04-2023 18_11_57.jpg

More help needed please
 
I can post a combined patch of the one above and moving pointer patch both by @Matthew if anyone's interested. The patch above has lost some initial spaces which will cause it to fail.

I have added some extra genre colours and moved the pointer vertically because it was overlapping the days at the top and ending before the last channel entry at the bottom (this might be browser dependent).
 
Last edited:
Note that this patch is against webif version 1.5.1-1
Copy to the box to say /tmp, then...
Code:
cd /tmp
unzip webif-matthew-combined.patch.zip
cd /mod/webif
patch -p1 < /tmp/webif-matthew-combined.patch
Afterwards you should only need a full refresh of the browser's cache.
 

Attachments

  • webif-matthew-combined.patch.zip
    3.2 KB · Views: 7
Last edited:
@xyz321 - Installed perfectly - thank you.
Should point out that if anyone else uses this in your instructions you have missed out the word patch in the unzip line. Should be:
Code:
unzip webif-matthew-combined.patch.zip
Thank you once again
 
@xyz321 - Unfortunately the patch 'disappeared' after the recent WebIf updates. I tried patching again but no go (because the patch is against 1.5.1-1 ?)
Not sure if it is worth redoing if another WebIf update will cause it to fail.
 
Even better would be to add the patches to to the git source for the webif so that they become incorprorated into the official webif release
 
I tried patching again but no go (because the patch is against 1.5.1-1 ?)
Not sure if it is worth redoing if another WebIf update will cause it to fail.
'no go' is not very descriptive.
Nothing has changed between 1.5.1-1 and 1.5.1-4 that affects this. I've just tried re-applying it without problems:
Code:
humax /mnt/hd2/mod # patch -p0 -i tmp/webif-matthew-combined.patch
patching file webif/html/js/epg_popup.js
patching file webif/html/xepg/index.jim
patching file webif/html/xepg/script.js
patching file webif/html/xepg/style.css
patching file webif/lib/epg_search
and then reverted it by adding -R to the command. If you have gnupatch installed, you can add the --dry-run option to try it without applying it.
Even better would be to add the patches to to the git source for the webif so that they become incorprorated into the official webif release
I've looked at it on more than one occasion, but there are several things I don't like.
 
Is this to do with RS or the WebIF EPG? The discussion seems to revolve around WebIF EPG, but the title says "RS".
 
Is this to do with RS or the WebIF EPG? The discussion seems to revolve around WebIF EPG, but the title says "RS".
While the original request was for RS the actual implementation was for Webif

AFAIK we still don't have the ability to modify any part of the RS

I've looked at it on more than one occasion, but there are several things I don't like.
I wpuld agree that while I like the updating yellow bar and ability to change the EPG favourite group I am less convinced of the value of some of the other changes and therefore it would be nice to customise which changes are included in the display
 
Back
Top