[mythtv] program->airdate (table->field) question

jack snodgrass mrlinuxgroups at gmail.com
Tue Sep 11 01:56:31 UTC 2007


What is the purpose for this field:
airdate  	year(4)
in the program table? There is another, similar field:
originalairdate  	date
that takes a full date and not a 4 digit year.

I'm asking because mythfilldatabase sets the airdate to the current year using:

if (pginfo->airdate.isEmpty())
    pginfo->airdate = QDate::currentDate().toString("yyyy");

if the airdate has not been set prior to getting to this code.
A different piece of code sets the originalairdate field.

When MythWeb does:

            if (in_array($data['airdate'], array('0000-00-00', '0000',
'1900-01-01')))
                $this->airdate = $data['originalairdate'];
            else
                $this->airdate = $data['airdate'];

it ends up showing the current year instead of the original airdate
when showing info
about a program listing.

I don't think that mythfilldatabase should be setting the airdate
field to the current
year if an originalairdate field has been set... or MythWeb should not use the
airdate field if an original airdate field has been set.

jack


More information about the mythtv-dev mailing list