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

jack snodgrass mrlinuxgroups at gmail.com
Wed Sep 12 12:14:49 UTC 2007

On 9/10/07, jack snodgrass <mrlinuxgroups at gmail.com> wrote:
> 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


Should I just open this up as a bug? I'd like more info in what the airdate
field ( 4 digit field ) is supposed to be used for.


More information about the mythtv-dev mailing list