Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#13021 closed Patch - Feature (fixed)

Feature patch: Entry to watching livetv from frontend EPG using select action

Reported by: perkins1724@… Owned by: Peter Bennett
Priority: minor Milestone: unknown
Component: MythTV - General Version: Unspecified
Severity: low Keywords:
Cc: Ticket locked: no


Further to discussion on user list at

Currently (fixes/0.28), when within the mythfrontend EPG and not currently watching livetv, to enter livetv from the EPG requires the use of the 'menu' action.

I propose to allow the 'select' action to return an option to goto "Watch This Channel" when the highlighted program is close enough to the current time.

guidegrid.cpp currently has 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. This patch is for a corollary that if the user is browsing close enough to now in the frontend EPG and is not currently in livetv that they probably intend to view that channel rather than interact with the recording rules.

Attachments (3)

myth_guidegrid.patch (1.5 KB) - added by perkins1724@… 4 years ago.
myth_guidegrid_v2.patch (2.8 KB) - added by perkins1724@… 4 years ago.
20170407_guide_livetv.patch (5.1 KB) - added by Peter Bennett 4 years ago.
Pater's patch v1, without the threshold -1 part yet

Download all attachments as: .zip

Change History (12)

Changed 4 years ago by perkins1724@…

Attachment: myth_guidegrid.patch added

comment:1 Changed 4 years ago by Peter Bennett

Owner: set to Peter Bennett
Status: newassigned

comment:2 Changed 4 years ago by Peter Bennett

comment:3 Changed 4 years ago by Roger Siddons

Note the guide can be invoked from 3 sources; main menu, live TV & pre-recorded videos/recordings. Change channel isn't sensible nor easy to implement for the latter, so there will always remain some inconsistency in the guide UI.

New users expect the Select to invoke Live TV because that's what their TV does. However many Myth users use the guide exclusively for scheduling (the "Myth-way").

The Select is always going to be ambiguous. A UI that guesses the user's intentions is likely to irritate many, particularly when it is time-based and obscures the option to override it.

From Live TV it's reasonable to presume because the user is already using Live TV (although scheduling a recording about to start on another channel whilst continuing to watch the current one, seems problematic).

But extending that behaviour to the menu guide is a bad idea, I think, particularly considering muscle-memory. If I try to schedule a last-minute recording by Guide, choose prog, Select, Select then it will usually do what I expect. Do it a minute too late and I'll end up in Live TV. WTF? And then I have to find an alternative route to schedule the recording.

I suggest;

  1. Add Watch TV to the EditRecording() pop-up so that users always see both options.
  2. Add the 'guessing logic' to the menu guide, as suggested, to preselect the relevant option. The user can then simply confirm it with 1 keypress, but always has the ability to override it.
  3. Add an "Always" (-1) value to the threshold setting to prevent the UI ever 'guessing' LiveTV. A default (5 mins/0 mins?) would enact the proposed behaviour for new users & LiveTV users. But non-LiveTV users could also configure it to preserve the existing behaviour (always schedule).

comment:4 Changed 4 years ago by perkins1724@…

I think comment:3 sums up the inherent conflict in this context of livetv versus only pre-recorded well.

re the suggestions:

  1. adding Watch TV to the EditRecording?() pop-up has made me nervous from the start. Partly because changing schedulecommon.cpp to implement is well beyond my capability but also because I worry that it may introduce unintended behaviour in unintended places - for example maybe because of the program finder progfind.cpp functionality. I don't understand the code well enough to know the full implications of this so will leave to others more suitably experienced. That aside - it would seem to be a solid compromise between the two viewpoints.
  2. -
  3. I will modify my original patch snippet (so it remains as an option) to essentially make setting '0' to be the equivalent to disabled. Note that this setting currently defaults to '16' but may not have affected pure pre-recorded users previously. This patch may require those users to manually enter setup (mythfrontend -> setup -> video -> program guide) and change the setting to '0' to retain the pre-patch EPG behaviour, which may cause initial frustration from users who do not desire the altered behaviour. An alternative may be to create a new setting from scratch but seems to be overkill when the dual use of the setting appears consistent / complementary.

Changed 4 years ago by perkins1724@…

Attachment: myth_guidegrid_v2.patch added

comment:5 Changed 4 years ago by Peter Bennett

Regarding the above patch -

  • I cannot see what the checking of end time achieves. If the start time is less than the threshold or is in the past, the first condition is satisfied and none of the others is used. If the start time is greater than that threshold, the end time will be greater by even more, secsTillStart will be positive, so neither of the other conditions will be satisfied.
  • The test for if (!m_player) - It looks like you found a bug - In the current code if I watch a recording, then in the recording, select the guide and from there go to menu, watch this channel, there is an error message in the log and nothing happens. A check for !m-player would solve that, so this is a good find.

My preferred solution:

When running the guide not from inside LiveTV, you press enter in the guide, you get a menu with "Record this showing", "Record all showings" and 3 more items. This menu is different if there is a recording already set, a recording in progress, recording failed, etc. Add to the top of this menu "Watch This channel", in cases where you have selected the current playing show, or a show that starts within the specified time period.

I would also like to add a feature that lets you set SelChangeRecThreshold to -1 (or 0) and that would cause it to always go immediately to live tv if you select a show that is currently running, and go to the recording menu (with the watch livetv option included) otherwise. This is my preferred setting. If you do want to record a show that has already started, going to watch live tv and then pressing Record (R) is probably the fastest way of doing it anyway.

Changed 4 years ago by Peter Bennett

Attachment: 20170407_guide_livetv.patch added

Pater's patch v1, without the threshold -1 part yet

comment:6 Changed 4 years ago by perkins1724@…

Thanks Peter for the patch. I have applied and it works well for me.

Two notes:

  • The first two checks I had on starttime / endtime were on absolute values not raw values. This was to provide some pseudo symmetry in behaviour when browsing sufficiently far enough away from now in either direction - in particular that when far enough from now the menu popup with watch this channel did not appear. When using absolute values the check on endtime caught programs that had a long duration (ie starttime was a large time away from now) but had just finished (endtime close to now). Your patch still shows 'Watch This Channel' when browsing large distances in the past.
  • If in future patch you enable a -1 type value to SelChangeRecThreshold? that causes it to always go to livetv it might be good (if possible / practical) to also add a -2 type value to never go to livetv to address the concerns from Roger / comment:3.

The patch works well for me, have applied and will use. Thankyou greatly for drafting this up!

comment:7 Changed 4 years ago by Peter Bennett

On thinking about it some more, I decided better not to add a feature that always goes to LiveTV. It could cause some pain for people who want to do something to a recording already in progress. So I plan to install the patch as is.

As far as selecting a program in the past, the behavior is consistent with the guide in LiveTV, where if you navigate into the past and select a program, it immediately goes to that channel. Scheduling a program in the past is probably not a common activity anyway.

comment:8 Changed 4 years ago by Peter Bennett <pbennett@…>

Resolution: fixed
Status: assignedclosed

In 4920cb2c590e609564524f684f67acebb370f9fe/mythtv:

Add "Watch This Channel" to guide select menu when appropriate.

Fixes #13021

comment:9 Changed 3 years ago by Peter Bennett

Owner: changed from Peter Bennett to Peter Bennett
Note: See TracTickets for help on using tickets.