[mythtv-users] entry to watching livetv from frontend EPG
Mark Perkins
perkins1724 at hotmail.com
Tue Mar 21 20:40:37 UTC 2017
> -----Original Message-----
> From: mythtv-users [mailto:mythtv-users-bounces at mythtv.org] On Behalf
> Of Peter Bennett
> Sent: Wednesday, 22 March 2017 12:45 AM
> To: mythtv-users at mythtv.org
> Subject: Re: [mythtv-users] entry to watching livetv from frontend EPG
>
>
>
...snip...
>
> This has also been irking me.
>
> Unfortunately the program guide from the main menu is internally the same
> as the program guide from the Manage Recordings->Schedule Recordings,
> where you presumably do not want to go into Live TV.
Yes good point I had not considered. It doesn't affect the working of Program Finder or Search Words etc but yes it alters the behaviour for Manage Recordings -> Schedule Recordings -> Program Guide which based on path navigated to get there would be counter intuitive.
>
> The challenge is for the code to tell the difference in the program guide when
> invoked from different menus. If that can be done I think the existing logic
> would work. Use the default of starting LiveTV if close to current time when
> invoked from the main menu, and use the Record default when invoked
> from Schedule Recordings,
Which will be difficult because the menu's can be themed - so potentially impossible?
>
> I have this on my list of things to do. I will take a look at your patch and see if
> I can come up with the best solution.
>
> Peter
I've modified my patch so that when in the middle of long shows (where start and finish time are both some distance away from now) it still works.
--- mythtv/programs/mythfrontend/guidegrid.cpp 2017-03-21 16:32:32.003323807 +1030
+++ mythtv/programs/mythfrontend/guidegrid.cpp 2017-03-22 06:56:51.796684706 +1030
@@ -825,6 +825,34 @@
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) ||
+ ((secsTillStart < 0) && (secsTillEnd > 0))
+ ))
+ {
+ ShowMenu();
+ }
+ else
+ {
+ EditRecording();
+ }
+ }
else
EditRecording();
}
More information about the mythtv-users
mailing list