Problems with setting default EPG type when the Movie Player is used

Issue #308 resolved
prl created an issue

If the default EPG type is changed during a session (between GUI or system restarts), and the Movie Player is used to play a recording or a video in the same session, the Movie Player will use the old setting of the EPG style, and when the GUI or system is next restarted, the EPG style will revert to its old value.

The problem is caused by the fact that InfoBar and MoviePlayer both inherit from InfoBarEPG and the initialisation of both parent classes creates new instances of ConfigSelection() for config.usage.defaultGuideType and config.usage.defaultEPGType.

The instance of ConfigSelection() assigned to the two config variables in the Movie Player is always assigned after the assigned in InfoBar, when the Movie Player starts playing a recording. If the EPG default style is changed in liveTV, class variables in InfoBar keep track of the change, and it always shows the correct EPG style. If a recording/video is played in Movie Player, then a new instances of the ConfigSelection variables are created and assigned to the config structure. This means that any changes made to the original config variables won't be saved when the GUI exits.

config.usage.defaultGuideType and config.usage.defaultEPGType should be assigned at file level, not within a class method, and should probably be moved from Screens.InfoBarGenerics into Components.UsageConfig. The class instance variables self.defaultEPGType and self.defaultGuideType should also be re-evaluated whenever config.usage.defaultEPGType resp. config.usage.defaultGuideType are changed.

There is also code in InfoBarEPG that forces the display of the Event Info screen for long-EPG (and long-INFO). This may have been an attempt to work around this bug. Anyway, I can't see any reason for keeping that behaviour if this bug is fixed. Long-EPG and long-INFO should allow the default EPG type to be chosen while playing movies as well as in live TV.

Understanding this code is also not helped by the fact that most of the methods and variables that control the default EPG style for the EPG button have "Guide" in their names, while most of the corresponding methods and variables that control the default EPG style for the INFO button have "EPG" in their names.

Reproduction steps

Long-POWER>Restart GUI.

When GUI has restarted, long-EPG>Select default EPG type... and select a new default type for the EPG.

Then MEDIA, and start playing a recording or video. Press EPG, and it will show the previous EPG type, not the newly selected one. Press EXIT to go back to video playback.

Press STOP, then EXIT to go back to live TV.

Then Long-POWER>Restart GUI.

When GUI has restarted, EPG will use the EPG type that was set before the change made in the previous session.

Comments (1)

  1. prl reporter
    • removed issue_resolution
    • removed issue_percent
    • removed issue_close
    • removed issue_status

    The issue was updated with the following change(s):

    • The status has been updated, from New to Closed.
    • This issue has been closed
    • This issue's progression has been updated to 100 percent completed.
    • The resolution has been updated, from Not determined to Fixed.
  2. Log in to comment