[mythtv-users] MythArchive: what am I doing wrong?!

Andrew Sayers andrew-mythtv-users at pileofstuff.org
Sat Jan 12 12:04:40 UTC 2008

So far as I know, the only thing you should need to do before the new
backend will accept the XML file is change the values of the <chanid>
elements.  MythTV gives each channel a unique ID, which is decided
more-or-less at random, so it's unlikely that a channel will have the
same chanid in two different databases.

If you had thousands of recordings and a copy of the old backend's
database, it would have been worth working out how to automate the
process.  Since you only have a few recordings though, you're probably
best off doing this by hand.

I suggest you make a backup of the XML file, load the file in your
favourite text editor, then replace every instance of
<chanid>foo</chanid> with the correct channel ID for your new database.
 You can get a list of correct channel IDs by running the following
command in a terminal:

. /etc/mythtv/mysql.txt && \
 mysql "-u$DBUserName" "-p$DBPassword" "-h$DBHostName" mythconverg \
 --exec 'SELECT chanid, callsign, name FROM channel'

	- Andrew Sayers

More information about the mythtv-users mailing list