[mythtv-users] MythTV retuning to channel on channel change when it's the same channel (Patch incl.)

Joe Votour joevph at yahoo.com
Sat Aug 23 22:08:23 EDT 2003


Isaac,

In playing around with MythTV, I found another slight
issue that I consider a bug.

On my television set, if I'm watching a channel, and
then I try to change the channel, the TV does nothing.
 There's not really much of a point in changing the
channel I would think.

Anyway, MythTV doesn't realize that it's on the same
channel, so it retunes.

Here's a patch that prevents MythTV from changing
itself to the same channel.  If you think it's worthy,
then please do add it.  The only negative effect I can
think of is if the TV::GetChannelInfo code takes a lot
of time to execute (since it does appear to do a
query).

The patch is against 0.11 of MythTV, I haven't updated
to CVS lately (although I did check the function in
question to make sure it hadn't been updated).

BTW, Isaac, I'd like to say thanks for MythTV. 
Despite the problems I'm having (which are not the
fault of MythTV), it's a great program.

-- Joe

--- tv_play.cpp.old     2003-08-23 20:48:32.000000000
-0700
+++ tv_play.cpp 2003-08-23 20:37:21.000000000 -0700
@@ -1725,6 +1725,21 @@
 {
     bool muted = false;

+    // Start of patch
+    QString dummy;
+    QString chan_name;
+
+    // First check to see if we're currently on the
same channel that we
+    // requested.  To do this, first get the current
channel information.
+    activerecorder->GetChannelInfo(dummy, dummy,
dummy, dummy, dummy, dummy, dummy, dummy, chan_name,
dummy);
+    // If the channel that we're currently on is the
same as the one requested
+    // just return (no point in retuning to the same
channel (that I can think
+    // of).
+    if (chan_name == name)
+    {
+         return;
+    }
+
     if (!activerecorder->CheckChannel(name))
         return;

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


More information about the mythtv-users mailing list