[mythtv-commits] Ticket #5122: Program airdate set to 2000 when using EIT

MythTV mythtv at cvs.mythtv.org
Thu Apr 3 01:53:51 UTC 2008

#5122: Program airdate set to 2000 when using EIT
 Reporter:  Bill <level42 at sympatico.ca>  |       Owner:  ijr    
     Type:  defect                       |      Status:  new    
 Priority:  minor                        |   Milestone:  unknown
Component:  mythtv                       |     Version:  unknown
 Severity:  medium                       |     Mlocked:  0      
 When using EIT and when the fixup routine does not set the airdate (ie.
 defaults to 0000), the airdate in the program table ends up getting set to
 2000.  When using the guide listing in mythweb, the program info popup
 will show '2000' rather than the set originalairdate.  Mythweb will only
 show the originalairdate if the airdate='0000'.  Both mythweb and the
 libmythtv/programinfo.cpp and libmythtv/programinfo.cpp expect the airdate
 to be set to 0000 (database default) if the airdate has not be set from
 the eit data.

 The reason for this is that when DBEvent::GetOverlappingPrograms (eit.cpp)
 retrieves the airdate, the prog.airdate variable is set to '0' even though
 it is actually set to '0000' in the database. The '0' is then subsequently
 passed to DBEvent::UpdateDB which then updates the database.  For whatever
 reason when mysql sees '0' it actually sets airdate to '2000' .  This
 behaviour can be replicated by executing

 UPDATE program SET airdate='0';

 The airdate is then actually set to '2000'.

 The attached patch, sets prog.airdate to QString::null if it retrieves '0'
 from the database.  The current routine UpdateDB has the correct code to
 detect the null condition and set the airdate to '0000' when updating the

Ticket URL: <http://svn.mythtv.org/trac/ticket/5122>
MythTV <http://www.mythtv.org/>

More information about the mythtv-commits mailing list