[mythtv] Small patch for mythtv? (European (?) channel names)
Sun, 15 Sep 2002 21:35:00 +0200
Well, I basically gave up on qmake and freetype1/2. I figure the best thing
to do is to port mythtv to freetype2 at some point (and get anti-aliased
... So I read a few more posts and noticed that the database structure
apparently isn't well suited for european channel names like "S9" and "E38",
since channum is an int and not a String.
So I began hacking it up, and created a small script to modify the database
table "channel" - adding a column "channel" (should work even with data in
ALTER TABLE channel ADD channel VARCHAR(5);
UPDATE channel SET channel = channum;
ALTER TABLE channel MODIFY channel VARCHAR(5) NOT NULL UNIQUE KEY;
... And a very small patch to look up the information (but not using it)
(while making the routine use a join and not a C++ inner loop lookup):
< QString thequery = QString("SELECT channum,starttime,endtime,title,"
< "subtitle,description,category FROM program
< "WHERE channum = %1 AND starttime < %2 AND
< "endtime >
> QString thequery = QString("SELECT prg.channum,"
> "chn.callsign,chn.icon,chn.channel "
> "FROM channel chn,program prg "
> "WHERE chn.channum = prg.channum "
> "AND prg.channum = %1 "
> "AND prg.starttime < %2 "
> "AND prg.endtime > %3;")
< thequery = QString("SELECT callsign,icon FROM channel WHERE channum "
< "= %1;").arg(lchannel);
< query = db_conn->exec(thequery);
< if (query.isActive() && query.numRowsAffected() > 0)
< test = query.value(0).toString();
> test = query.value(7).toString();
< test = query.value(1).toString();
> test = query.value(8).toString();
The above is untested - it compiles, however.
So is this the way to go, or are you/we going for the approach posted last
month about multiple broadcasters, capturecards and cardinputs?
One last thing: Am I babbling too much? Are you interested in my