[mythtv] mythvideo - category, country and genre

Kevin Elliott kevin at phunc.com
Fri Dec 19 12:08:34 EST 2003

On Fri, Dec 19, 2003 at 01:17:30AM +0100, MaxPower wrote:
> I prepare a patch to integrate category, country, genre and complex filter.
> I have made this before to switch to 0.13 then I must recode for this 
> release
> I explain :
> I would like create category as Movies, TV Show, Music, Hollidays, ... 
> (fully configurable by user)
> A video can be only one category.
> For this I  have  apply the Johan Bellander's idea :Add a column in 
> videometadata called category (INT).
> I add a table called videocategories like this
> category VARCHAR(128)
> An other way can be to just create a category field varchar(128)  in 
> videometadata with an index

First of all, thank you for working on a much needed feature. As for the
database change for the category, please use the first method you
describe. Integer comparisons (like the ones done in WHERE clauses) are
almost always faster than full text comparisons, even when you're
indexing (for example SUSPENSE gets converted to number form at some
point down the line). You can always load up the list of categories
once, keeping their id as reference, and only loading upon changes.

> For country and genre, I grab information from IMDB
> a video can haw few genre and few country
> I have create a table videocountries (videogenres) like this
> country (genre) varchar (128)
> And an other videometadatacountry (videometadatagenre) with theses fields
> idvideo which is the primary key of  videomatadata
> idcountry (idgenre) which the primary key of videocountries (videogenres)

Can you add an additional column for length of video? Since not all 
video clips are in IMDB (like music videos, tv shows, etc) we can't
always get that information, so it would be nice to at some point
populate that field from video file headers. For now it can be
manually populated, much like the other meta data you've added.

> I have create a dialog which allow the user to filter the video list 
> with theses fields
> showlevel  (0,1,2,3,4,5)
> category (All, category 1, category 2...Not Defined)
> genre (All, Drama, Action Adventure ...Not Defined)
> country (All, USA, UK, France, Germany ... Not defined)
> year (ALL,  2003,2002, .....Not Defined)
> runtime (ALL, 0 mn < runtime <= 30, 30 < runtime <= 60, 60 < runtime 
> <=90 ... Not Defined)
> userrating (All, >9, >8, >7, ... ,Not defined)
> browse (All, Yes, No)

It all looks good. What does the showlevel do?

> I have added an item in the mythvideo menu that open this dialog. but 
> this dialog can open too in videobrowser and videomanager.
> If you don't want to use the feature, you can, it's change nothing for 
> the user which don't want to use this.
> Before sending this new feature in few littles patchs, I would like to 
> know if you have any objection or suggestion

I'm looking forward to this get updated into CVS soon.

Kevin Elliott
kevin at phunc.com

More information about the mythtv-dev mailing list