[mythtv] Question about program table
Bruce Markey
bjm at lvcm.com
Sat Feb 5 23:14:16 UTC 2005
Torbjörn Jansson wrote:
> I just wanted to confirm if i have understood the fields in the program
> table right.
>
> previouslyshown is prety obvious,
Actually, it's not ;-). There are at least three concepts that
us humans can lump together and confuse; something I've seen
before, something that is being rebroadcast for a second time
today or this week, something that was shown months or years
earlier. These are very different concepts that could all be
referred to as repeats or reruns. The oldrecorded table tracks
the first, the listings could have a marking to indicate either
or both of the second and third and the originalairdate if present
can help determine if it is the third kind.
If something is marked as a "Repeat" (whatever that means) that
is only informational. However, previouslyshown is used as a
flag to determine if a showing is legible for New episodes only.
If there is an orginalairdate, it can be determined if the episode
first aired within the past two weeks or not. It there isn't a date
then the best guess is if there is a Repeat flag but something
shown a few hours earlier may be marked as a repeat and something
from several years ago may not be.
> but when it's true, the orginalairdate
> specifies the date it was last shown, right?
The name actually means "the original air date". You could then
move these words around to make sentences like "The date that this
episode originally aired" =).
mysql> select title,originalairdate from program where originalairdate > 0000-00-00 order by originalairdate limit 5;
+-------------+-----------------+
| title | originalairdate |
+-------------+-----------------+
| Stanley | 1903-12-16 |
| I Love Lucy | 1952-04-21 |
| I Love Lucy | 1952-04-28 |
| I Love Lucy | 1952-05-05 |
| I Love Lucy | 1952-05-12 |
+-------------+-----------------+
Somehow I doubt that "Stanley" was shown on television in 1903.
If you did actually want to know when a title was last aired up to
a year ago, you could find this in the oldprogram table.
mysql> select * from oldprogram where oldtitle = 'I Love Lucy';
+-------------+---------------------+
| oldtitle | airdate |
+-------------+---------------------+
| I Love Lucy | 2005-01-31 10:30:00 |
+-------------+---------------------+
> And airdate is the year of the movie, kind of like production year or
> something?
Correct! And horribly named. I've been trying to call this "year"
internally.
> And parttotal/partnumber is the episode or part number, so if i have the
> first episode of a tv series partnumber woud be 1 and parttotal the total
These are normally not episode numbers but for two part episodes
or mini-series and such. However, I've seen some data from Oscar
for Sweden where these may be used as the episode number within
a season or something like that.
> number of episodes or null if it's unknown?
> Or does it start counting from zero?
These may be provided in the listings and are only informational
as far as myth is concerned. They are for humans to read so they
start from 1. It is non-sensical to use these unless there are
more than one parts.
mysql> select count(*) from program where parttotal < 2 and partnumber > 0;
+----------+
| count(*) |
+----------+
| 0 |
+----------+
> What is syndicatedepisodenumber and how is that related to
> parttotal/partnumber ?
syndicatedepisodenumber: the name is derived from a field to show
thenumberthattheproduceroftheshowusedtoidentifytheirshowforthemselves.
There are no rules for how shows catalog their episodes and isn't
required so this isn't a very useful key for database organization.
Some random examples look like this: 9021, HI157, 102, 11111, 3X02,
NL03, 010, 3018W, W402, HD092404. The listings databases use their
own programids to catalog all episodes of all shows uniformly.
There is no relationship to the parttotal/partnumber other than the
show's producer could use a scheme that may indicate if it is part
of a multi-part episode.
-- bjm
More information about the mythtv-dev
mailing list