[mythtv] db schema, metadata and season/episode numbering

Torbjörn Jansson torbjorn.jansson at mbox200.swipnet.se
Wed Apr 11 11:02:32 UTC 2012


Hi.

I'm trying to figure out how the season and episode numbers is stored in the
database.
The background to this is that I'm trying to do a bit of creating scripting
to populate the season and episode numbers based on data that is already
present in the database.
Having proper episode and season numbers I think should make the metadata
lookup able to do a better job and if possible I don’t want to do this
myself manually if it can be avoided.

I have an old installation of myth that I've been using for many years and
most of my recordings do have the episode numbers but it is usually stored
in the subtitle or other location.

I've looked at the database and I got some questions.
I think I understand how it works, but I'm not 100% sure.

Table recordedprogram contains one field called syndicatedepisodenumber.
This field appears to be the correct episode and season for most of my
recordings, format is something like E8S2.
I'm thinking I could take this info and update the season & episode fields
in recorded (converting & splitting the string as needed of course).

When syndicatedepisodenumber is missing I would have to read the subtitle
and see if it matches a predefined pattern for episode and season numbers.


recorded & recordedprogram can be joined on chanid + starttime right?
And it is the season and episode fields in recorded that is used by the
metadata lookup?

Comments? Is there a better way maybe that I have not thought of yet?




More information about the mythtv-dev mailing list