[mythtv-commits] Ticket #3295: Scheduler schedules recordings on channels it doesn't receive

MythTV mythtv at cvs.mythtv.org
Wed Apr 11 21:56:38 UTC 2007


#3295: Scheduler schedules recordings on channels it doesn't receive
-----------------------+----------------------------------------------------
 Reporter:  anonymous  |       Owner:  ijr    
     Type:  defect     |      Status:  new    
 Priority:  minor      |   Milestone:  unknown
Component:  mythtv     |     Version:  0.20   
 Severity:  medium     |  
-----------------------+----------------------------------------------------
 I've found a little problem with the way mythtv schedules programs.

 If more than one capturecard is connected to a single inputsource, mythtv
 assumes that it can receive every channel associated with the inputsource
 on either capturecard.  Normally this is probably true, but I've found at
 least one case where it isn't.

 I've got a cable box connected by firewire (dct-6200) and a DVB card
 (pchdtv-5500) both connected to the same feed.  The cable box can get any
 channel, but the DVB card can only get a subset of the channels.  I can't
 set up two different input sources because mythfilldatabase changes the
 datadirect lineups, and I end up with no data for a bunch of channels.
 The result is that mythtv schedules recordings on channels it doesn't know
 how to tune, and these recordings fail, so I miss a bunch of shows.

 I thought about a few ways to address this, and this seemed to be the
 simplest.  This patch changes the SQL query in AddNewRecords so that
 programs that can't be tuned are omitted.

 It's written as a case structure so that others that have different
 hardware might add additional when clauses that describe when a particular
 device might be used.

 Anyway, I hope this is helpful.  Please let me know if I didn't do this
 correctly, as this is the first time I've submitted a ticket for mythtv.
 Here's the patch:

 $ svn diff programs/mythbackend/scheduler.cpp
 Index: programs/mythbackend/scheduler.cpp
 ===================================================================
 --- programs/mythbackend/scheduler.cpp  (revision 13212)
 +++ programs/mythbackend/scheduler.cpp  (working copy)
 @@ -2319,6 +2319,10 @@
  " LEFT JOIN oldfind ON "
  "  (oldfind.recordid = recordmatch.recordid AND "
  "   oldfind.findid = ") + progfindid + QString(") "
 +" WHERE (CASE capturecard.cardtype "
 +"  WHEN 'FIREWIRE' THEN channel.channum = channel.channum+0 "
 +"  WHEN 'DVB' THEN (channel.mplexid && channel.mplexid != 32767) "
 +"  ELSE 1 END)"
  " ORDER BY RECTABLE.recordid DESC "
  );

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/3295>
MythTV <http://svn.mythtv.org/trac>
MythTV


More information about the mythtv-commits mailing list