[mythtv-commits] Ticket #1520: Don't automatically add new channels in mythfilldatabase

MythTV mythtv at cvs.mythtv.org
Mon Apr 24 22:12:36 UTC 2006

#1520: Don't automatically add new channels in mythfilldatabase
 Reporter:  dwilga at mtholyoke.edu  |        Owner:  ijr     
     Type:  patch                 |       Status:  reopened
 Priority:  minor                 |    Milestone:          
Component:  mythtv                |      Version:          
 Severity:  medium                |   Resolution:          
Changes (by sphery <mtdean at thirdcontact.com>):

  * resolution:  wontfix =>
  * status:  closed => reopened


 Attached patch ( mythtv-mythfilldatabase-remove_new_channels.patch ) adds
 a command-line option (--remove-new-channels) to mythfilldatabase (mfdb)
 to allow users of analog cards to specify that new channels appearing in
 the !DataDirect (DD) lineup should be removed from the lineup and should
 not be added to the MythTV database.  I used dashes in the option name
 since all other options (except --do_channel_updates) use dashes (see also

 The --remove-new-channels option is ignored if the user also specifies
 --do_channel_updates.  Also, if the videosource is digital, the option is
 ignored (since it specifies the default behavior for digital sources).

 If the user specifies --remove-new-channels, the user's DD lineup is
 always updated once per mfdb run--regardless of whether the lineup
 contains additional channels or not.  The same is true for users with DVB
 or ATSC sources (whether they specify --remove-new-channels or not).
 Later, I may look at adding code to prevent the lineup update when the
 lineup is already correct.

 Updating the DD lineups requires wget version 1.10+ (for the --keep-
 session-cookies option).  Any user with wget 1.9.x or below will get a
 wget failure in  DataDirectProcessor's GrabLoginCookiesAndLineups(), which
 will cause mfdb to abort the attempt to update the lineup.  However,
 because DataDirectProcessor::UpdateChannelsSafe() was already called and
 told not to add the new channels, they will not appear in the MythTV
 database but all future downloads of DD data will include the additional
 channel(s).  Since most users will probably be using wget 1.10.x, I didn't
 think it was worth working out a way to add the channels to the database
 if the lineup update fails, thereby forcing them to notice and fix/ask
 about the failure.  (So, it works the same way as the digital videosource
 code that was previously there).  Therefore, I hope affected users will
 notice the wget error message:

 Usage: wget [OPTION]... [URL]...

 Try `wget --help' for more options.

 in their mfdb log file and ask about it on the lists...  :)

 I also noticed that in the event a provider has multiple channel numbers
 for the same channel in the DD lineup, updating the lineup will select
 both channels.  For example, DISH network puts "local" channels in the
 8xxx range--providing unique channel numbers for all channels--but also
 creates "aliases" for those channels in the < 100 (probably < 70) range
 using the same channel number as OTA broadcasts--i.e. channels 2 and 8272
 are both WESH on my subscription.  I previously had 13 channels in my
 lineup--12 of which had duplicates in the 8xxx range.  After the update, I
 had 25 channels in my lineup.  However, the total increase in data size
 was only 700 bytes since DD only has to provide the extra channel
 information, where both channels will use the same ID to reference the
 program data.  And, the code that does the station updates sees the
 channel as already existing (since it has the same xmltvid as another
 channel), so the additional channel is not added to the MythTV database.
 Therefore, I didn't feel it was worth changing the behavior.

 (I'm assigning to danielk because he wrote the code to make this
 possible.)  Daniel, it looks to me like the only reason you disabled
 updating the lineup for analog sources was because you wanted it to be an
 option (perhaps with a different default) and, possibly, because you
 didn't have time to do the associated testing.  If that's not the case and
 you would like me to do this differently, please let me know how you want
 the analog side to work.

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

More information about the mythtv-commits mailing list