[mythtv-commits] [MythTV/mythtv] 5f8934: Handle Live TV start channel invalid value

kmdewaal noreply at github.com
Thu Aug 5 12:06:26 UTC 2021

  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: 5f8934294ee7f4b6c30523d624c67a1638b0853d
  Author: Klaas de Waal <klaas at kldo.nl>
  Date:   2021-08-05 (Thu, 05 Aug 2021)

  Changed paths:
    M mythtv/libs/libmythtv/cardutil.cpp
    M mythtv/libs/libmythtv/cardutil.h
    M mythtv/libs/libmythtv/tv_play.cpp
    M mythtv/libs/libmythtv/tv_rec.cpp
    M mythtv/libs/libmythtv/tv_rec.h
    M mythtv/libs/libmythtv/videosource.cpp
    M mythtv/programs/mythfrontend/guidegrid.cpp

  Log Message:
  Handle Live TV start channel invalid value

Column startchan in table capturecard contains a channel number,
format as in table channum, that is used as the channel to tune
into when "Watch TV" is selected on the main menu.
The value is also used at the start of mythbackend, to verify
that the capture card is actually working.
Every Live TV channel change, including Live TV selected from
the program guide, results in an update of startchan.
Only Live TV does this; the value is not updated for recordings.

The "happy flow" in which startchan has a valid channum value
has not been changed.
When the startchan does not have a valid channum value the
following is now done:
- Check if the value of startchan is indeed a valid channel;
  a channel is only valid if it is also visible.
- If the value of startchan is not valid channel then get the first
  visible channel from the channel list of the associated video source.

This fixes the problem of "Watch TV" not being able to start
due to an incorrect startchan value.

This is implemented in CardUtil.cpp function GetStartChannel.
There was similar but less effective code in tv_rec.cpp function
GetStartChannel; this function is now removed and the function
in CardUtil is called instead.

More information about the mythtv-commits mailing list