Favourite list not populated

Matthew

Active Member
Having added the option to choose the favourite from directly within the EPG I decided to create an additional favourite list, so did that on the box yesterday but noted the change is not reflected within the webif.

Switch on today and its still not there! I`ve applied
Code:
service epg restart
but still nothing.

How long does it take the webif to update its favourite lists?
 
Checked again still nothing on the favourite I had created (number 3) but they are there under favourite 4, so why is the box favourite numbering different? I`ve now made a 4th favourite list on the box, it will be interesting to see where that appears on the webif.

This is what the favourite backup file shows:

Code:
#
# Favourites
favname    1    1    Favourite 1
favname    2    2    Favourite 2
favname    3    4    Favourite 3
favname    4    8    Favourite 4
favname    5    16    Favourite 5
fav    1    1    BBC ONE HD    290
fav    1    1    BBC TWO HD    291
fav    1    1    ITV HD    292
~~~
fav    1    1    BBC NEWS    330
fav    2    1    BBC ONE HD    331
fav    2    1    BBC TWO HD    332
fav    2    1    ITV HD    333
fav    2    1    Channel 4 HD    334
fav    2    1    Channel 5 HD    335
fav    2    1    BBC FOUR    336
fav    2    1    Film4    337
fav    4    1    Channel 4 HD    339
fav    4    1    Film4    340
fav    4    1    movies4men    341
fav    4    1    Paramount Network    342
fav    4    1    TalkingPictures TV    343
fav    4    1    Sony Movie Ch    344
fav    4    1    Horror Channel    345#
 
Favourite group numbers seem to be represented as bits, so there is only 1, 2, 4, 8, 16.
Generally the code does something like:

Code:
loop i 1 6 {
                set idx [expr 1 << ($i - 1)]
                ...
}
 
Favourite group numbers seem to be represented as bits, so there is only 1, 2, 4, 8, 16.
Generally the code does something like:

Code:
loop i 1 6 {
                set idx [expr 1 << ($i - 1)]
                ...
}

Thanks, but that seems to be missing! My epg group choose option merely replicates the settings code (for the most part)

With favs 1 to 4 set only 1,2 & 4 are populated in the webif EPG, making the following changes means results are as expected.

Code:
--- /mod/webif/html/xepg/index_orig.jim
+++ /mod/webif/html/xepg/index.jim
@@ -45,7 +45,9 @@
 }
 
 set favgroup [$settings channel_group]
-
+if {$favgroup} {
+  set favgroup [expr 1 << ($favgroup - 1)]
+}
 set hours [cgi_get hours -]
 if {$hours eq "-"} {
     set hours [expr 1.0 * [[settings] xepghours]]

Code:
--- /mod/webif/html/epg/list_orig.jim
+++ /mod/webif/html/epg/list.jim
@@ -23,8 +23,12 @@
 set then $($now + 14400)
 set s [settings]
 set favgroup [$s channel_group]
+if {$favgroup} {
+  set favgroup [expr 1 << ($favgroup - 1)]
+}
 if {$::qepg} {
     if {$favgroup} {
         set records [epg dbfetch dump \
             -trange "$now:$then" -fav $favgroup]
     } else {

If that is happening somewhere else, I can't find it and its not working on my machine.

If this bug is as appears I would think other files need the change too.
 
@af123 A further bug has come to light:

If a Favourite is renamed on the box, its name appears at the end of the list on the webif and has no regard to the actual favourite group to which it should relate.

Looking at the dBase read I see it simply looks for the text and takes no note of the related ID, I would suggest the read should grab the text sorted by ID.

I gather the RS does not exhibit these bugs.
 
I didn't know it was such an old known bug!

The fix I proposed above does resolve the favs 1,2,4 only working, however the other issues are more complex.

As far as I can see when schedule does a restore it simply deletes all box favourite names and restores from the backup except for some reason its only reading the 1st 4 names from the backup!

As I stated before the dBase read through settings ignores any name/index relationship.

On my box I now have only 4 favourites I can change though 5 appear in the webif because I renamed them and those names got deleted on boot.
 
I found a way to restore the deleted 5th favourite through the box menus

Menu->Channel List scroll right to Favourite 5, press green (edit) it shows the current channel and 5 favourites, select number 5 and OK

Now if you edit your favourites as normal you will find number 5 is back!

You may have to edit No5 before it works on the webif (but only with above code fix)
 
Last edited:
I do not have the skills to incorporate the code (unless there is a step by step procedure somewhere). Hopefully the code will be incorporated into an update sometime soon.
 
I do not have the skills to incorporate the code (unless there is a step by step procedure somewhere). Hopefully the code will be incorporated into an update sometime soon.

This will fix it for the EPG grid mode (not mobile) but not search mode (that's the other change)

Goto Diag->File Editor

Open /mod/webif/html/xepg/index.jim

Find (near top)

Code:
require epg_popup

set now [clock seconds]
set stt [cgi_get stt $now]
if {$stt <= $now} {
    set stt $now
    set current 1
} else {
    set current 0
}

set favgroup [$settings channel_group]

add just after

Code:
if {$favgroup} {
  set favgroup [expr 1 << ($favgroup - 1)]
}

Save the file and your done.

Given this has not been done for 4 years perhaps it wont get fixed.

If the webif gets an update (without a fix) you will have to repeat the above.

I was posting this form of update originally, but it seems it's disapproved of.
 
I was posting this form of update originally, but it seems it's disapproved of.
Did I say that? I only pointed out the diff output existed as a de facto standard. Educate people to use it (and I have shown it can be automated) rather than support two representations.
 
I'm working my way through this thread so I can incorporate the fixes into the web interface. It looks like there are a few different issues with favourites!

For the EPG pages using the wrong favourites group/groups 3,5 not working, I've fixed this in the central epg class search method. The pages themselves are doing the right thing in calling the query routine with -fav <group number>, but this needs adjusting to the group index in the class.
https://github.com/hummypkg/webif/commit/132afd3ca791e06d553796534de9c28ee5f451de

For favourite groups appearing in the wrong order, I've added a sort line as @Matthew suggested.

https://github.com/hummypkg/webif/commit/22b6892b2d8e707974128e1db1053453d47d0f88

I can't immediately find a problem with restoring favourites - can anyone redefine the problem for me (and provide a dump of the rsvp.db database immediately after a restore and before the required reboot)?

What's happening with RS @peterworks ?

(the above-two changes are in the beta webif 1.4.4-2)
 
What's happening with RS @peterworks ?

I have five favourites set up (and working fine) on WebIf (both Humaxs') as follows:
BBC (Fav 1) - all BBC channels
ITV (Fav 2) - all ITV channels
Four (Fav 3) - all Four channels
Five (Fav 4) - all Five channels plus Drama
MyTV (Fav 5) - all the above

On RS Humax 1 I get the following in the EPG:
BBC (Fav 1) - working fine
ITV (Fav 2) - working fine
Four (Fav 3) - displays nothing
Five (Fav 4) - display Fav 3 (Four)
MyTV (Fav 5) - showing as None in the drop down list in Settings and shows nothing

On RS Humax 2:
As above except that MyTV (Fav 5) is available in the drop down list in Settings but shows nothing.
 
can anyone redefine the problem for me (and provide a dump of the rsvp.db database immediately after a restore and before the required reboot)?

Sorry haven't made the issue quite clear enough, its not a restore that creates the problem, simply a reboot or power cycle, you change fav names, reboot, fav names are reset!

I've done the following test,

changed names, rsvp.bd shows:

Code:
 /var/lib/humaxtv/rsvp.db
favnames
1     Favourite 1
2     Favourite 2
3     Favourite 3
4     Favourite 4
5     Favourite 5

Do a backup, backup file shows:

Code:
#
# Favourites
favname    1    1    Fav1
favname    2    2    Fav2
favname    3    4    Fav3
favname    4    8    AFav4
favname    5    16    Fav5

Then I do a re-boot, fav names are all reset (this time last is not deleted, don't know why)

rsvp.db is still as above.

Next I do a restore from the just created backup, now fav names have the renamed values and rsvp.bd shows:

Code:
 /var/lib/humaxtv/rsvp.db
favnames
1     Fav1
2     Fav2
3     Fav3
4     AFav4
5     Fav5

And the names now survive a reboot.

So it appears a way around the issue is to backup then restore and the issue is rsvp.db is not reflecting changed names till after a restore.
 
Sorry haven't made the issue quite clear enough, its not a restore that creates the problem, simply a reboot or power cycle, you change fav names, reboot, fav names are reset!
Thanks, that helps immensely. Fixed in rsvsync 1.1.12-1 which should appear in the repository shortly.
 
Last edited:
On RS Humax 1 I get the following in the EPG:
BBC (Fav 1) - working fine
ITV (Fav 2) - working fine
Four (Fav 3) - displays nothing
Five (Fav 4) - display Fav 3 (Four)
MyTV (Fav 5) - showing as None in the drop down list in Settings and shows nothing

Can you please re-test when you get a chance, I think this should be fixed now.

On RS Humax 2:
As above except that MyTV (Fav 5) is available in the drop down list in Settings but shows nothing.

Same here - this problem was caused by the fifth favourite group having spaces in the name "Not used" - the server can now deal with these.
 
Can you please re-test when you get a chance, I think this should be fixed now.
Thanks @af123 - all working as it should. Only 'problem' is that 'Not used' is still in the drop down list instead of MyTV on Humax 1. Will have a look tomorrow to see if it has caught up.
 
Back
Top