<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=iso-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Michael T. Dean wrote:
<blockquote cite="mid45467225.5070306@thirdcontact.com" type="cite">
<pre wrap="">On 10/30/06 12:20, Jon Larson wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I use mythfilldatabase --file with a custom XML file, so I know exactly
what is being fed into the database.
</pre>
</blockquote>
<pre wrap=""><!---->Technically, you know exactly what's in the file... ;)
</pre>
<blockquote type="cite">
<pre wrap="">The problem is that if I remove a program from the import XML list for a
given source/XML ID (i.e. the program is 'cancelled'); it doesn't get
removed from the program guide in Myth. It just sits there until i
remove it manually using webmin or let it expire.
The command I'm currently using to fill the program guide is this:
mythfilldatabase --verbose all --file 1 -1 /path/to/my/tv.xml
So I'm wondering if anyone knows what I can do to force mythtv to delete
any programs that are no longer listed in the imported XML? Also,
shouldn't it do this without being forced?
</pre>
</blockquote>
<pre wrap=""><!---->
Without a lot more details of what you're doing, I couldn't tell you
what's happening. </pre>
</blockquote>
So here's the details:<br>
<br>
I don't record TV show from traditional stations--the myth box is used
to record lectures at my institution. So to get the program guide, we
export a copy of our room schedule database into XML format and import
that with the command I pasted above.<br>
Occasionally, the folks who enter the room schedule information
make changes/revisions such as canceling a lecture or moving it to
another room (which are set up as channels in mythtv). Obviously, I'd
like those changes/deletions to be reflected on the Mythtv database,
but unfortunately some of them seem to be sticking around--even though
they are no longer present in the XML file that is imported.<br>
<br>
<blockquote cite="mid45467225.5070306@thirdcontact.com" type="cite">
<pre wrap="">What I can tell you is that mythfilldatabase deletes
all programs from the listings that match a specific source within the
time period of the data it's using to fill the databse and then it
populates that time period with the shows from the listing.
</pre>
</blockquote>
When I have verbose logging on, this is what I see when running the
command above:<br>
<br>
<pre>### bypassing grabbers, reading directly from file
2006-10-30 16:46:05.875 Using runtime prefix = /usr
2006-10-30 16:46:05.898 New DB connection, total: 1
2006-10-30 16:46:05.902 Connected to database 'mythconverg' at host: localhost
2006-10-30 16:46:05.905 Enabling Settings Cache.
2006-10-30 16:46:05.905 Clearing Settings Cache.
2006-10-30 16:46:05.907 MSqlQuery: SELECT data FROM settings WHERE value = 'LogEnabled' AND hostname = 'mythtv' ;
2006-10-30 16:46:05.908 MSqlQuery: SELECT data FROM settings WHERE value = 'LogEnabled' AND hostname IS NULL;
2006-10-30 16:46:05.910 MSqlQuery: SELECT data FROM settings WHERE value = 'LogMaxCount' AND hostname = 'mythtv' ;
2006-10-30 16:46:05.912 MSqlQuery: SELECT data FROM settings WHERE value = 'LogPrintLevel' AND hostname = 'mythtv' ;
2006-10-30 16:46:05.914 MSqlQuery: UPDATE settings SET data ='2006-10-30 16:46' WHERE value='mythfilldatabaseLastRunStart'
2006-10-30 16:46:05.915 MSqlQuery: UPDATE settings SET data ='currently running.' WHERE value='mythfilldatabaseLastRunStatus'
2006-10-30 16:46:05.916 MSqlQuery: SELECT MAX(endtime) FROM program;
2006-10-30 16:46:06.227 New DB connection, total: 2
2006-10-30 16:46:06.228 Connected to database 'mythconverg' at host: localhost
2006-10-30 16:46:06.229 MSqlQuery: SELECT data FROM settings WHERE value = 'TimeOffset' AND hostname = 'mythtv' ;
2006-10-30 16:46:06.231 MSqlQuery: SELECT data FROM settings WHERE value = 'TimeOffset' AND hostname IS NULL;
2006-10-30 16:46:06.317 MSqlQuery: SELECT chanid,name,callsign,channum,finetune,icon,freqid,tvformat FROM channel WHERE xmltvid = '1' AND sourceid = 1;
2006-10-30 16:46:06.318 MSqlQuery: SELECT chanid,name,callsign,channum,finetune,icon,freqid,tvformat FROM channel WHERE xmltvid = '2' AND sourceid = 1;
2006-10-30 16:46:06.319 MSqlQuery: SELECT chanid,name,callsign,channum,finetune,icon,freqid,tvformat FROM channel WHERE xmltvid = '3' AND sourceid = 1;
2006-10-30 16:46:06.320 MSqlQuery: SELECT chanid,name,callsign,channum,finetune,icon,freqid,tvformat FROM channel WHERE xmltvid = '4' AND sourceid = 1;
2006-10-30 16:46:06.321 MSqlQuery: SELECT chanid,name,callsign,channum,finetune,icon,freqid,tvformat FROM channel WHERE xmltvid = '6' AND sourceid = 1;
2006-10-30 16:46:06.322 MSqlQuery: SELECT chanid,name,callsign,channum,finetune,icon,freqid,tvformat FROM channel WHERE xmltvid = '7' AND sourceid = 1;
2006-10-30 16:46:06.323 MSqlQuery: SELECT chanid,name,callsign,channum,finetune,icon,freqid,tvformat FROM channel WHERE xmltvid = '9' AND sourceid = 1;
2006-10-30 16:46:06.324 MSqlQuery: SELECT chanid,name,callsign,channum,finetune,icon,freqid,tvformat FROM channel WHERE xmltvid = '10' AND sourceid = 1;
2006-10-30 16:46:06.324 MSqlQuery: SELECT chanid,name,callsign,channum,finetune,icon,freqid,tvformat FROM channel WHERE xmltvid = '11' AND sourceid = 1;
2006-10-30 16:46:06.325 MSqlQuery: SELECT chanid,name,callsign,channum,finetune,icon,freqid,tvformat FROM channel WHERE xmltvid = '12' AND sourceid = 1;
2006-10-30 16:46:06.326 MSqlQuery: SELECT chanid,name,callsign,channum,finetune,icon,freqid,tvformat FROM channel WHERE xmltvid = '14' AND sourceid = 1;
2006-10-30 16:46:06.327 Updating icons for sourceid: 1
2006-10-30 16:46:06.328 MSqlQuery: SELECT ch.chanid, nim.url FROM (channel ch, callsignnetworkmap csm) RIGHT JOIN networkiconmap nim ON csm.network = nim.network WHERE ch.callsign = csm.callsign AND (icon = 'none' OR icon = '') AND ch.sourceid = 1
2006-10-30 16:46:06.330 New DB connection, total: 3
2006-10-30 16:46:06.331 Connected to database 'mythconverg' at host: localhost
2006-10-30 16:46:06.332 MSqlQuery: SELECT chanid FROM channel WHERE sourceid = 1 AND xmltvid = '1';
2006-10-30 16:46:06.336 MSqlQuery: SELECT * FROM program WHERE chanid=1001 AND starttime='.....
It repeats that final select statement for each event, and then I see the line:
Updated programs: 0 Unchanged programs: 617
</pre>
I can confirm that the deleted event was not included in that list of
617, and yet it remains in the Myth database.<br>
<br>
<blockquote cite="mid45467225.5070306@thirdcontact.com" type="cite">
<pre wrap="">
Therefore, my best guess is that you're not editing the file correctly...
What you haven't told us, though, is, "Why?" You shouldn't need to edit
your listings. If a program is cancelled, it doesn't appear in the
listings. I really have no idea what you're trying to do or why it's
necessary, so I can't really tell you what you should be doing.
Mike
_______________________________________________
mythtv-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>
<a class="moz-txt-link-freetext" href="http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users">http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users</a>
</pre>
</blockquote>
<br>
So what I'm trying to do in the end is understand the mythfilldatabase
program/process better so I can figure out what is going wrong. I see a
number of delete statements, but all of them are concerned with
deleting old programs--none of them seem to do this:<br>
<br>
<pre wrap="">"mythfilldatabase deletes
all programs from the listings that match a specific source within the
time period of the data it's using to fill the databse"
If the delete statement should be there, shouldn't it be executed before the "SELECT * FROM program..." statements? And since I don't see it in the section I pasted above, what should I do to remedy the problem?
Any help would be appreciated....
Jon
</pre>
<br>
<br>
<br>
</body>
</html>