[mythtv] Database question/problem

Isaac Richards mythtv-dev@snowman.net
Thu, 10 Oct 2002 12:31:01 -0400


On Thursday 10 October 2002 12:15 pm, GrandMasterLee wrote:
> On Thu, 2002-10-10 at 10:16, johns@dvt-inc.com wrote:
> > Hi all,
> >
> > I finally got the latest CVS (tarball from 10/10) to compile and run, but
> > I run into a couple of problems which I believe are related to the
> > database.
> >
> > 1) I cannot change channels.  This appears to be a classic database
> > problem.  Pause live TV works, mythepg works with the correct channel
> > names and program schedule.

For this, make sure that you have a cardinput that matches to the proper 
capture card and the proper channel source..  If you crack open the source, 
try to see why libs/libmythtv/tv.cpp:TV::CheckChannel() (starting at line 
1656) returns false.

> > 2) When I schedule a recording the wrong channel is recorded.  Actually
> > it appears to always be one less than the channel I would like to record.
> > For example if I want to record channel 12 then it records channel 11.

Pretty much the same thing, really..  Take a look at 
libs/libmythtv/tv.cpp:TV::SetChannel() (line 884), and see if you can figure 
out why it's changing to the wrong channel.  I'd like to know the main query 
in both cases (stick something like a cout << thequery << endl; after it gets 
setup), and the results from the databae.

> I've found that the channel index starts at 0, also, if a channel scan
> is performed, it can also skew the numbers, since not all channels are
> accounted for. Just my 0.02.

That's no longer the case with the current database structure -- the internal 
channel ids are 1000 + channel number.

> > I recreated the database then reran setup and mythfilldatabase with no
> > errors.  The records for program, channel and single*record looked OK
> > (chanid matched, channel number was correct, etc.).
>
> Did this start happenening after using Mythtv for a while, or was it all
> of a sudden?
>
> > Any suggestions?
> >
> > John