[mythtv] 4 digit channel support

Michael T. Dean mtdean at thirdcontact.com
Wed Nov 17 00:36:58 UTC 2010


  <fixed top posting>

On 11/16/2010 05:48 PM, Chris Weiland wrote:
> On Tue, Nov 16, 2010 at 5:15 PM, Stuart Morgan wrote:
>> On Tuesday 16 Nov 2010 17:56:47 Chris Weiland wrote:
>>> Good question - I didn't think about that.  The only problem I see
>>> there is if the channel lineup does not include any channels>= 1000
>>> but the cable box still expects 4 digits.  For example, the user may
>>> not care about the channels>= 1000 (doesn't want to waste the
>>> time/storage grabbing listings, maybe can't tune them anyway due to
>>> those channels being encrypted), so he removes them from his lineup.
>> I don't know how SchedulesDirect operates this so maybe their behaviour is at
>> odds with this, but the recommended option in MythTV is to 'hide' those
>> channels and not delete them.

Schedules Direct users should at minimum remove the channels they don't 
want/aren't receiving from their Schedules Direct lineup.  They are 
welcome to leave them in the video source (i.e. fill the channels in the 
video source, then hide the channels they don't want, then edit the SD 
lineup to remove the channels they don't want), but there's a much 
simpler option (below).

Leaving the channels in the lineup, but hidden in the video source means 
that every day, TMS has to process those channels for the user and the 
user has to download the listings for those channels that he/she isn't 
using, and mythfilldatabase has to put the data in the right place, 
and--since they're hidden--that data is never actually used by anyone.  
Especially with --dd-grab-all (already enough of a resource hog), 
minimizing the number of channels in the lineup is a huge processing 
benefit for both TMS and the MythTV user.

>>   With most input methods deleting channels
>> outright causes unintended and unwanted results which is why the hide option
>> exists to begin with.
>>
>> If utilised this way then the max length would still be correct.
>>
>> Ultimately we really don't want to be adding new configuration options when
>> more intelligent solutions can be used.
> Fair enough.  I don't think that a 100% reliable detection method is
> possible here, but that should be close enough.  But back to the real
> issue...

I think it's unlikely that many users will have 4-digit boxes and only 
use 3-digit channels.  Those who do can always create a channel manually 
with 4-digits, such as 9999 (or whatever), that's not got an xmltvid 
(and, therefore, receives "No Data") and is marked as not visible.

> Is there anyone knowledgeable and willing to help me with this change
> (specifically with the digit count detection)?  Or is there somewhere
> in the Myth code where I can see a similar example?  I'm experienced
> enough to make the changes, but I would much prefer to have some help
> from someone that is familiar with the existing codebase so that I
> don't step on the existing functionality/style.

SELECT MAX(LENGTH(freqid)) FROM channel WHERE sourceid = ?;

perhaps?

Mike


More information about the mythtv-dev mailing list