Mythfilldatabase XML file formatting

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
phackmann
Junior
Posts: 18
Joined: Sun Aug 05, 2018 9:08 pm
United States of America

Mythfilldatabase XML file formatting

Post by phackmann »

Hi All. I'm tinkering with making some custom schedule entries for my MythTV install. I understand how I can import it with mythfilldatabase from the command line, and I have done some trial and error testing with that with mixed success. I have seen a couple of example XML files to be used with it, but I don't seem to have a good grasp of the recommended XML schema to generate a valid XML file. Does anyone have documentation of how the XML file should be formatted? I can continue to make guesses, but I figure there must be a document somewhere that the developers use? Can anyone share? It would be much appreciated!

Thanks,
Paul
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: Mythfilldatabase XML file formatting

Post by paulh »

I think we just support the standard from the XMLTV project.
http://wiki.xmltv.org/index.php/XMLTVFormat

The id attribute from the <channel> element and the channel attribute in the <programme> elements is what links the data to a channel in MythTV with the same xmltvid.
phackmann
Junior
Posts: 18
Joined: Sun Aug 05, 2018 9:08 pm
United States of America

Re: Mythfilldatabase XML file formatting

Post by phackmann »

Ah I see! That does clear up some of my questions. I was wondering about the id attribute, and also the programid attribute, and that is making more sense. I can see where several of the entries go in the database. I do wish there was a list of what XML items map to what sections of the Program table in the mythtv database. Thank you for the help!

Paul
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: Mythfilldatabase XML file formatting

Post by paulh »

I'm not aware of documentation that maps the xml item to the database other than the code itself.

This is were the parsing happens. Hopefully you can get an idea of what info we pull from the xml and what fields it updates in the ProgInfo. Most of the names are similar to the field names used in the various database tables.
https://github.com/MythTV/mythtv/blob/m ... r.cpp#L188
Post Reply