Some patches for OpenVix

General info

I've written some simple patches for OpenVix to better handle, for me, certain things on my Miraclebox Premium Twin box. These are:

FP-Icons
Code to set the "circle icon" spinning on the front panel when a recording is in progress. On the MB Twin there are 4 different versions, so the visual display is the number of recordings mod 4.
Could easily be extended to any other box with the symbol_circle driver in /proc/stb/lcd.
Bouquet scan - exit at end of list
Add code to the scan of bouquets (which is actually present twice, even though the first instance could just call the second function) so that there is an exit from the loop if the zap-to service isn't found in the bouquets. Otherwise you end up with a hang....

Incorporated

All of these are in release 4.2.001.
No shutdown prompt while watching recording
This stops the user being prompted about switching the box to (deep) standby at the end of a recording (when that option has been set) if they are currently watching a recording, so clearly they wouldn't want to.
This is an extension of the NoSleep-during-Playback patch (vide ultra) to Recording Timers.
This is in the same file as the FP-Icons patch (vide ultra). Both patches have been applied to the RecordTimer.py file in the directory, but the patches are separated.
Zap timer when MoviePlayer active
A zap timer can be activated when the movie player is running, but the shutdown of the movie player gets it to set the channel back to the original, and that happens after the zap timer's work is done.
This patch checks for a running movie player and, if there is one, defers the zap timer until the movie player has closed.
PowerTimer StandBy Tests
Patch to test for the box serving a remote streaming client and, if there is one (or more), any auto-Deep Standby Timer is delayed whilst this is in progress.
It also checks for the currently playing service being a saved recording and prevents (Deep) Standby whilst this is true (unless the box is already in Standby - which can happen if you put it into Standby without stopping a movie playback).
RecordTimer StandBy Tests
Patch (updated on 07 February) to test for the box serving a remote streaming client and, if there is one (or more), any auto-Deep Standby Timer is delayed whilst this is in progress.
It also checks for the currently playing service being a saved recording (playback) and prevents (Deep) Standby whilst this is true (unless the box is already in Standby - which can happen if you put it into Standby without stopping a movie playback).
NoPromptImageBackup
Add the scheduling code to the Image backups that I added to the Backup code. So it also adds an option to stop the automated image backup from querying you whether you wish it to run when the box is not in standby mode (it just runs...) - the ability to background an image backup has been removed from the patch as this ability has lead to invalid image backups in the past.
It also adds the auto-trim option for older images.
AvoidPlayBackCrash
If you go to the Movielist while a recording is still playing, stop it and start another one there seems to be a timing issue that means the playLastCB() callback gets called with a new self (it has no attributes).
This causes a crash.
This patch drops back to live TV instead, and puts up a warning message to that effect.
ReDo-Backoff
A more thorough implementaion of a fix for repeating Power Timers which have backed-off. The original begin time needs to be remembered for the repeat.
The original fix only applied to AtferEvent.DeepStandby back-offs. This applies them to any backed-off timer.
PruneTimerLogs
Although completed timers (recording and power ones) can be removed from the log after a configurable number of days, any repeating timer is left there, along with all of the state changes that occur to it.
This patch adds code to remove old sub-entries from them when the entry is re-written.
Fast-Forward/Rewind hang
Fast Forward or Rewind can end up in an uninterruptable loop (more likely with an MPEG2 file)
Patches to the enigma2 C++ code to fix this. The findFrame() and findNextPicture() functions are listed in their entirety.
NoSleep-during-Playback
NOTE: an extended (to include Deep Standby) version of this has been added to OpenVix at v3.2.024.
Adds code to the Auto‑Standby PowerTimer to check whether you are viewing a recording before prompting you to put the box into standby (which you presumably will not wish to do if you are watching a recording!).
BootProgress
NOTE: a slightly modified (but equivalent) version of this has been added to OpenVix for the v3.2.030 release.
Code to update the front pannel with the percentage progress as enigma2 starts up. This looks like the standard code isn't being updated as new box models arrive?
I find it useful to reassure me that things are progressing. Include with 3.2_030.
PrematureDeletion
Code to ignore an attempt to delete a recording when there is no Current Selection in the list. This can happen if you stop a recording and press the Red button (expecting to be back at that recording in the menu list) before the menu has been drawn.
The fix is just to ignore the key press in such cases.
A slightly different fix has been added to 3.2_032.
EventViewRecord
Add code to import config from Components.config. Without this setting a timer form an Info pop-up box from an EPG results in a crash. Has been added to the latest git and appeared in 3.2_032..
MessageBox
Errors from a background job don't get sent to the debug log.
This fix sends the text there as well as to the screen.
SanityCheck
Fixes to the TimerSanityCheck.py code
Ignore already‑finished timers (which get passed in at boot time), as they cannot clash.
Set some variables to None after use, otherwise we hang on to reference counts meaning that some C++ objects aren't freed. This results in incorrect clashes being reported (such as a clash against a single recording when you have two identical tuners).

Experimental

These are still being tested by me....
VariableUniqueness
WORK IN PROGRESS - code liable to change at any time!!
Read the TODO file...but basically now completed as far as using Vix menus goes - still need to look at OpenWebif handling of the changes.
Allows you to vary the "similarity" for title, short and long description matching from the default (80, 70, 70 respectively).
Allows you to trim any trailing [*] flag settings from description before comparing.
Enables setting "timer groups" for timers with similar descriptions. This is a time range (n hours from hh:mm) within which events are taken to be the same. Outside of this they are taken to be different events even if their descriptions match. (The latest hh:mm on (configurable) day(s) before the earlier event is taken as the start of the group - the allowable base day(s) are configurable via filters.
You can also add "trim filters", which allows you to trim flags (such as [HD,S]) and "irrelevant" txt (e.g"followed by ...") from the end of the description so that the comparison more readily reflects the actual description for the programme.

I'll (try to remember to) keep these up to date as new OpenVix releases arrive. Previous versions (which may have different changes) are kept in the older sub-directory for each patch.

They are generally browseable, as well as being able to follow the individual links in the description headings above.

To install just put the *.py file(s) (etc.) into the directory noted in the GMLinfo file and restart enigma2.


01 September 2016