[mythtv] Bug in tv_rec.cpp (TVRec::GetStartChannel)
Mika Orajärvi
mika.orajarvi at iki.fi
Wed Nov 23 01:13:57 EST 2005
On Wed, 2005-11-23 at 00:07 -0500, Michael T. Dean wrote:
> Mika Orajärvi wrote:
>
> >I think there's some bugs in the mentioned file and function regarding
> >the names of the mysql tables/entries. I'm using the mythtv svn.
> >
> >The problems appeared after I wiped the DB clean and run the setup
> >again.
> >
> >In the mysql query:
> >
> >----
> >query.prepare(
> > "SELECT startchan "
> > "FROM capturecard, cardinput "
> > "WHERE capturecard.cardid = cardinput.cardid AND "
> > " capturecard.cardid = :CARDID AND "
> > " inputname = :INPUTNAME");
> >
> >---
> >
> >I think the "inputname" should be "defaultinput". That's at least found
> >in the DB. After I changed the name, mythbackend found the starting
> >channel correctly.
> >
> >
> inputname is a valid column in the cardinput table, and, therefore,
> should be found by that query:
>
> mysql> SELECT startchan
> -> FROM capturecard, cardinput
> -> WHERE capturecard.cardid = cardinput.cardid AND
> -> capturecard.cardid = 1 AND
> -> inputname = 'S-Video 0';
> +-----------+
> | startchan |
> +-----------+
> | 238 |
> +-----------+
> 1 row in set (0.00 sec)
>
> I'll bet you looked for it in the capturecard table... ;)
>
Okay, it's there but the inputname that comes to the GetStartChannel()
is in my case "Television" and the inputname in the DB
(cardinput.inputname) is currently "DVBInput". So I figured that the
column name must be wrong, since the "Television" was found on the
defaultinput column. My config seems okay, i can't find any problems in
it. I've gotten the myth working before without any big problems. The
problems came after I wiped the DB, and therefore I assume that it has
to be related to the recent changes and maybe some renamings of the
colums etc.
> >But there's probably another bug somewhere (haven't found that yet)
> >since LiveTv does not start. Backend gives the following log:
> >
> >----
> >TVRec(1) Error: Channel: '1' was not found in the database.
> > Most likely, your DefaultTVChannel setting is
> >wrong.
> > Could not start livetv.
> >----
> >
> >Shall I make a ticket?
> >
> >
> No. Fix your config. ;) (Or, at least, not yet. First verify that
> your config is correct.)
>
> Make sure you provide a valid value for every input you have associated
> with a video source.
>
> Starting LiveTV channel.
> This is updated on every successful channel change.
>
> Oh, and make sure you change your code back before testing. Using
> defaultinput breaks the query.
>
> Mike
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
More information about the mythtv-dev
mailing list