[mythtv] RFC: Expanded playgroup settings
David Engel
david at istwok.net
Fri Dec 7 20:34:09 UTC 2007
On Thu, Dec 06, 2007 at 01:08:28PM -0500, Shane wrote:
> The problem is that zero (0) is treated as a special value in the playgroups
> table. Zero means 'use the value from the default playgroup', it's a nice
> feature that allows the user to selectively override some settings while
> using defaults for the others.
>
> The problem is that zero is a legitimate comm skip value (CommSkipOff = 0),
> and I see that zero equates to kScan_Detect as well.
>
> I reworked things so that negative values mean 'use the default'. This
> works fine for now but will undoubtedly be a problem later on.
>
> So, I was hoping there might be a more robust scheme to achieve this
> functionality. Not sure if using NULL as the special value is an option?
0 was used as the "fallback to default" value becuase it worked for
all of the settings I added first. There is no reason it has to stay
that way. My suggestion is to pass the minimum and maximum valid
values to PlayGroup::GetSetting(). Anything outside that range should
cause the default value to be returned.
David
--
David Engel
david at istwok.net
More information about the mythtv-dev
mailing list