[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
Thu Sep 8 21:11:44 UTC 2005

On Thu, Sep 08, 2005 at 07:27:14AM -0400, J. Donavan Stanley wrote:
> MythTV wrote:
> >#303: Some code to guess the category of an insert cd/dvd
> >-------------------------+--------------------------------------------------
> >Reporter:  anonymous    |        Owner:  jdonavan
> >    Type:  enhancement  |       Status:  assigned
> >Priority:  minor        |    Milestone:  0.19    
> >Component:  mythtv       |      Version:          
> >Severity:  medium       |   Resolution:          
> >      Cc:               |  
> >-------------------------+--------------------------------------------------
> >Comment (by leo at wau.mis.ah.nl):
> >
> >Not at all. But currently there is no table with these extensions. Well,
> >mythvideo has 'videotypes', that might be used. We could create
> >audiotypes, gallery types etc... Another option is to create a table
> >that maps suffixes to a media category, more or less the data of the now
> >static array but stored in the database.
> >
> >Suggestions?
> > 
> >
> Store them each as a comma deliminated list in the settings just make 
> sure it's a global setting not per host.

OK, working on it. small question....
If I create settings like:
 "VideoExtensions", "128,wmv,mpg,avi,vob,mpeg,nuv", NULL
 "MusicExtensions", "64,mp3,ogg,flac", NULL

Can I than retrieve these settings through a query of the form
 SELECT data FROM settings WHERE value LIKE %Extensions

or is this 'not done'.

I ask because GetSetting does not support it... I can of course use
someting like:
  MusicExtensions = GetSetting("MusicExtensions");
  VideoExtensions = GetSetting("VideoExtensions");

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.

-------------- 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/20050908/91ed253f/attachment.pgp

More information about the mythtv-dev mailing list