[mythtv] [Committed] DataDirect "Movie" category_type

Bruce Markey bjm at lvcm.com
Mon May 17 22:47:33 EDT 2004


Ben Bucksch wrote:
> Bruce Markey wrote:
...
>> I seem to remember that this needs to match "Movies" (with an "s") 
>> and/or things like "Action Movies" for at least some people.
> 
> 
> "Action Movies" should be written into field category, not cat_type, 
> that's exactly the difference between category and cat_type.

Okay, I did some research in the CVS logs and mail archives and
found that you did contribute the category_type code in mid-June
2003 (filldata.cpp rev 1.48 Jun 19). The issues I'd remembered
were probably from before that and your category_type is obviously
intended to resolve those language and grabber differences. I
didn't know that and clearly David Shay didn't either as these
showtype entries really look like the kind of thing that would
belong in the existing category_type field.

This is water under the bridge but another approach you could
have taken might have been to have category_type as an int field
and use an enum to list the known category types. This is how
the recording types work. Type "1" is "kSingleRecord" for example.
If category_type "1" was for movies it would be easier to see how
this field is used and there would be no question of string matching,
known types, or language.

Anyway, given that this field should be a specific set of strings
(although "movie" is the only one currently used), I think the right
answer would be to preserve the showtype data in a separate showtype
field then use the programid prefixes to determine the value for
category_type.

>> It's also interesting that those four types seem to be derived
>> from Zap2it's TMS database programid prefixes of MV%, EP% (meaning
>> EPisode of a series), SP% and SH%.

[from another message]
> But it's indeed interesting. SP = sports and SH = show? What DD encodes 

Yes.

> in the ID there seems to be very close to the intent of the cat_type 
> field. My grabber source encodes that as XML tags: <spielfilm>, <tvshow> 
> etc. (there are 6 different ones, IIRC). So, just do (pseudo-code)
> if (id.matches("^MV.*"))
> cat_type = "movie";
> else if (id.matches("^EP.*"))
> cat_type = "series";
> etc., then match on cat_type = "movie", and we should both be fine. For 
> other grabbers, see my post.

Right. This would almost work perfectly. Almost. There is a small
problem that was discussed recently regarding duplicate matching.
If a showing of a series has a generic episode description, they
(stupidly) use the SH prefix rather than EP even though it is a
series. Still, this is close enough to fill in the strings for
category_type. Also, the string translation should go away.

Does that sound about right to you?

--  bjm



More information about the mythtv-dev mailing list