[mythtv] Hack to retrieving digital channel listings

Ulmo-Mythtv-Dev at Usenet.Q.Net Ulmo-Mythtv-Dev at Usenet.Q.Net
Sun Jan 25 21:17:05 EST 2004


What I did to get it working was incomplete if you're converting old
data.  See http://WWW.PCHDTV.COM/ forum post of mine to see all the
data, except for a simple insight below about guessing about the new
xmltvid value when you're converting old data.

If you are editing mythconverg.channel to update channels which you
had already listed for ATSC before, you need to get correct "xmtlv"
column data into the old channels.  Here is a list of the intermediate
state of ones the program added, and a final list of the final state
that works; perhaps you can guess at the format those items need,
since then you wouldn't have to copy xmltv data from new rows to old
ones, delete new chanid rows from channel & programs, and then re-run
mythfilldatabase:

channel table:
+--------+---------+--------+----------+--------------+----------------------+
| chanid | channum | freqid | callsign | name         | xmltvid              |
+--------+---------+--------+----------+--------------+----------------------+
|   1008 | 8       | 10-1   | KSBWDT   | 10-1 KSBW-DT | C8ksbw.zap2it.com    |
|   1011 | 11      | 12-4   | KNTVHD   | 12-4 KNTV-HD | C11kntv.zap2it.com   |
|   1035 | 35      | 13-2   | KCBADT   | 13-2 KCBA-DT | C35kcba.zap2it.com   |
|   1125 | 11      | 12-5   | KNTVDT   | 12-5 KNTV-SD | C11kntv.zap2it.com   |
^^^^^^^^^^^^ OLD vvvvvvvvvvvvvvvvv NEW                  ^^^^^^^^^^^^^^^^^^^
|   1009 | 8       | 10-1   | KSBWDT   | 8 KSBWDT     | C8ksbwdt.zap2it.com  |
|   1012 | 11      | 12-4   | KNTVDT   | 11 KNTVDT    | C11kntvdt.zap2it.com |
|   1036 | 35      | 13-2   | KCBADT   | 35 KCBADT    | C35kcbadt.zap2it.com |
+--------+---------+--------+----------+--------------+----------------------+

Above is the intermediate state mythfilldatabase left me in in the
above.  (Before that, I had callsign set to KSBW-DT, KNTV-HD, KCBA-DT,
and KNTV-SD respectively).  It was only grabbing for 1009, 1012, and
1036, which obviously isn't what I wanted.  What I forgot to put in
for 1008, 1011, 1035, and 1125 was xmltvid.  You can gues what I need
to do for zap2it.com without even running mythfilldatabase to get the
real values:

C8ksbw.zap2it.com
C8ksbwdt.zap2it.com
      ^^

etc.

This means that if you already have old ATSC channels in your channel
& program database that you don't want to overwrite, you can just
modify xmltvid slightly and see if that works.  What we don't know yet
is whether or not you have to also modify callsign and channum.

However, this will probably change when Zap2It.Com figures out there
are multiple programs per channel.

Here's the final state of my channel table which works:

+--------+---------+--------+----------+--------------+----------------------+
| chanid | channum | freqid | callsign | name         | xmltvid              |
+--------+---------+--------+----------+--------------+----------------------+
|   1008 | 8       | 10-1   | KSBWDT   | 10-1 KSBW-DT | C8ksbwdt.zap2it.com  |
|   1011 | 11      | 12-4   | KNTVHD   | 12-4 KNTV-HD | C11kntvdt.zap2it.com |
|   1035 | 35      | 13-2   | KCBADT   | 13-2 KCBA-DT | C35kcbadt.zap2it.com |
|   1125 | 11      | 12-5   | KNTVDT   | 12-5 KNTV-SD | C11kntvdt.zap2it.com |
+--------+---------+--------+----------+--------------+----------------------+

+--------+----------+
| chanid | tvformat |
+--------+----------+
|   1008 | ATSC     |
|   1011 | ATSC     |
|   1035 | ATSC     |
|   1125 | ATSC     |
+--------+----------+

Then we can run mythfilldatabase.  It works for 1008-1035, but not for 1125:

mysql> SELECT * FROM program WHERE chanid=1008;
[...289 rows listed...]
289 rows in set (0.08 sec)

mysql> SELECT * FROM program WHERE chanid=1125;
Empty set (0.00 sec)

mysql>

Questions still to be answered:

* Can we change mythconverg.channel.channum and .callsign to whatever we
  want, and let xmltvid work for mythfilldatabase?  If not both, what
  about each one by itself?
* How do we get the new icons?


NOTE:  I think all the above editing can be done in the new channel
editor in myth cvs, but it certainly isn't necessary since I did all
of the above with MySQL (which I was forced to learn before the
channel editor existed).  There is one exception:  I deleted programs
from mythconverg.program that were added for the superfluous chanids.


More information about the mythtv-dev mailing list