[mythtv-users] entry to watching livetv from frontend EPG

Mark Perkins perkins1724 at hotmail.com
Tue Mar 21 10:34:24 UTC 2017


I happened to be on the forums earlier and saw a post regarding an inability to enter watching livetv from the frontend EPG (post is https://forum.mythtv.org/viewtopic.php?f=29&t=2069)

I believe the default configuration (fixes/0.28 and master at least) is that to enter watching livetv from the EPG (ie when not already within watching livetv) that you need to press the menu action, not the select action. Which is something I have found my significant other and guests to struggle with as they keep trying the select action over and over again (even I tend to go for select the first time, we don't do a lot of livetv).

I believe the menus are hardcoded so can't be overridden at theme level.

SELECT brings up a variable list of options depending on the state of the highlighted program but commonly:
Record this showing
Record all showings
Record one showing (this episode)
Record all showings (this channel)
Edit recording rule

But no "Watch this channel" option.

MENU brings up a variable list of options as well but commonly:
Watch This Channel
Record This
Recording Options
Program Details
Jump To Time
Reverse Channel Order
Channel Search

I would like to propose a feature enhancement patch. In guidegrid.cpp (https://github.com/MythTV/mythtv/blob/79d666c3e90be2b510ab4af3349aacb9ec474f30/mythtv/programs/mythfrontend/guidegrid.cpp#L808) there is already a piece of code that says if the user is browsing far enough away from now() while watching livetv and makes a select action that their intent is probably to interact with recording rules rather than change channel.

I would like to apply a corollary that if the user is browsing close enough to now() in the frontend EPG (not currently in livetv) that they probably intend to view that channel rather than interact with the recording rules. So something like this:

$ cat myth_guidegrid.patch
diff --git a/mythtv/programs/mythfrontend/guidegrid.cpp b/mythtv/programs/mythfrontend/guidegrid.cpp
--- a/mythtv/programs/mythfrontend/guidegrid.cpp        2017-03-21 16:33:43.438983048 +1030
+++ b/mythtv/programs/mythfrontend/guidegrid.cpp        2017-03-21 17:15:12.176075478 +1030
@@ -825,6 +825,29 @@
                     enter();
                 }
             }
+            else if (!m_player)
+            {
+                // If the selected program is close enough to now and not currently
+                // viewing livetv presume it possible that the user wanted to watch
+                // via livetv instead of editing the recording rule.
+                ProgramInfo *pginfo =
+                    m_programInfos[m_currentRow][m_currentCol];
+                int secsTillStart =
+                    (pginfo) ? MythDate::current().secsTo(
+                               pginfo->GetScheduledStartTime()) : 0;
+                int secsTillEnd =
+                    (pginfo) ? MythDate::current().secsTo(
+                        pginfo->GetScheduledEndTime()) : 0;
+                if (pginfo && (pginfo->GetTitle() != kUnknownTitle) &&
+                    (((abs(secsTillStart / 60)) <= m_selectRecThreshold) || ((abs(secsTillEnd / 60)) <= m_selectRecThreshold)))
+                {
+                    ShowMenu();
+                }
+                else
+                {
+                    EditRecording();
+                }
+            }
             else
                 EditRecording();
         }

If the user does actually intend to interact with the recording rules they can still continue to follow the menu options to do so, whereas under the current config the user needs to cancel out of the initial popup and press the menu key for the alternative popup. The main downside is that the menu options change as they get further from now() which may be confusing (but does mirror the preceding arrangement).

Is this something that is likely to get some support at dev level or should I just leave it be?


More information about the mythtv-users mailing list