SchedulesDirect recorded originalairdate for movies is 0 (Implemented)

What would you like to see in MythTV and why? Find others who might want to help implement your ideas!
Forum rules
Please be reasonable and positive with your feature requests, remember that all contributions to MythTV are by volunteers in their spare time. MythTV won't support piracy in any form, including torrents and use of soft cams, so to avoid embarrassment please do not ask.

* One suggestion per thread please. Do not post new suggestions in replies. *
Post Reply
luc5588
Junior
Posts: 39
Joined: Sat Dec 19, 2015 11:13 am
Reunion

SchedulesDirect recorded originalairdate for movies is 0 (Implemented)

Post by luc5588 »

Proposal: Populate originalairdate for recorded movies from airdate or tmdb lookup.


I recently switched from OTA listings to SchedulesDirect.

Previously the mythtv recorded table contained an originalairdate for movies such as '2015-01-01' (always 1st Jan). Now I only have 0000-00-00 for all newly recorded movies. I have a script that uses the field.

For example:

Code: Select all

select title,originalairdate,chanid,progstart from RECORDED where programid='MV005280550000' limit 1;
| 2 Guns | 0000-00-00      |  10220 | 2017-09-12 20:00:00 |                                                                                                                       

select title,airdate,originalairdate from PROGRAM where programid='MV005280550000' and chanid=10220 and starttime='2017-09-12 20:00:00';
| 2 Guns |    2013 | NULL            |                                                                                                                                            
The recorded table doesn't contain an "airdate" field.

The SD xmltv data for the movie contains year like this:
<date>2013</date>
<previously-shown/>

Whereas for tv episode it only contains:
<previously-shown start="20160316 +0000"/>

I think OTA used to copy 2013 in to both airdate and originalairdate.
So perhaps mythtv could do the same for SD if it is missing?

Or, it could copy it from the data returned by the tmdb lookup:

Code: Select all

/usr/share/mythtv/metadata/Movie/tmdb3.py -l en -a US -D 136400
...
    <title>2 Guns</title>
    <year>2013</year>
Thanks.
User avatar
pgbennett
Developer
Posts: 503
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: SchedulesDirect recorded originalairdate for movies is 0

Post by pgbennett »

Code already exists in mythfilldatabase to do this.

Code: Select all

            else if (info.tagName() == "date" && !pginfo->airdate)
            {
                // Movie production year
                QString date = getFirstText(info);
                pginfo->airdate = date.left(4).toUInt();
            }
It looks like it may be a bug, as the original air date should be supported for a movie.
If you open a ticket and add a sample of the xmltv data we can look into it.
luc5588
Junior
Posts: 39
Joined: Sat Dec 19, 2015 11:13 am
Reunion

Re: SchedulesDirect recorded originalairdate for movies is 0

Post by luc5588 »

Thanks, I've raised [https://code.mythtv.org/trac/ticket/13213].

You're right, it does populate airdate in mythfilldatabase, but I think OTA also populated originalairdate with the same information and that originalairdate is the only one persisted in to the recorded table.
Post Reply