[mythtv] Re: [mythtv-commits] Re: Ticket #303: Some code to guess
the category of an insert cd/dvd
Leo Weppelman
leo at wau.mis.ah.nl
Fri Sep 9 10:13:14 UTC 2005
On Thu, Sep 08, 2005 at 08:43:34PM -0400, J. Donavan Stanley wrote:
> Leo Weppelman wrote:
>
> >But this means that a new type of setting also needs an update of the
> >mythcdrom code and not only a database update. A pro would be that the
> >value of a '#define MEDIATYPE_MMUSIC 64' does not enter the database, while
> >it does in the first method.
> >
> >
>
> Not it it's written right... You already have two lists, all I'm
> suggesting is that they be moved to a setting then the list generated by
> splitting the string at the commas. Adding new types can then be done
> via dbcheck updates or end user tweaking.
I think you are missing the point... The difference is in the mediatype not
in the extensions.
In the first case, when adding stuff for a new mediatype, you only
have to insert a new setting into the database, say:
"RecepyExtensions", "256,rcp"
With 256 being the MEDIATYPE_MRECEPY value.
In the second case, you also have to add code to mythcdrom specifically
for the new recepy stuff like:
RecepyExtensions = GetSetting("RecepyExtensions");
I'll go for the second version for now, since this seems to be most in
line with the current Myth coding style. I can optimize later if
required.
Leo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050909/d5eb9c6d/attachment.pgp
More information about the mythtv-dev
mailing list