[mythtv-users] 'Cancelled' programs remain in schedule.
Jon Larson
jtlarson at u.washington.edu
Tue Oct 31 01:10:01 UTC 2006
Michael T. Dean wrote:
> On 10/30/06 12:20, Jon Larson wrote:
>
>
>> I use mythfilldatabase --file with a custom XML file, so I know exactly
>> what is being fed into the database.
>>
>>
>>
> Technically, you know exactly what's in the file... ;)
>
>
>> 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?
>>
>>
>
> Without a lot more details of what you're doing, I couldn't tell you
> what's happening.
So here's the details:
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.
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.
> 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.
>
When I have verbose logging on, this is what I see when running the
command above:
### 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
I can confirm that the deleted event was not included in that list of
617, and yet it remains in the Myth database.
> 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
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
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:
"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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20061030/f422353b/attachment.htm
More information about the mythtv-users
mailing list