[mythtv] [Committed] DataDirect "Movie" category_type

Bruce Markey bjm at lvcm.com
Mon May 17 04:35:20 EDT 2004


Ben Bucksch wrote:
> Ben Bucksch wrote:
> 
>> Can you change the "Movie" to "movie", please? Because this is 
>> supposed to be machine-readable, the difference matters, at least in 
>> the longer term.

Machines can read case insensitive strings just fine. In fact,
the SQL query is case insensitive so I don't believe the
capitalization would be the issue. "Movie" works for me now
in mythfrontend Search->Movies and mythweb "Movies" link and
both worked before with category_type "movie".

> I just checked and see that roughly the same bug appears in proglist.cpp 
> as well:
>    arg(tr("Movie").utf8())

As I recall, this is there because at least one other grabber
has the native language word for movie in this field. I believe
this was added specifically to solve that problem.

In a quick grep I only found tr("Movie") used for this purpose
and does not appear in the GUI anywhere so this string should
only be translated for the purpose of matching your grabber's
category_type if needed.

> This is the reason why I saw no results in the movie search screen, 

Which movie search screen using which grabber? 

> although my database is populated with the info - if you translate it, 
> it's going to break. Patch attached - can you please apply that?*

> Category type is an enum, just expressed as string, and thus all values 
> should be well-defined and are not meant for direct display to users. 
> They are all-lowercase, and mythfilldatabase adds them as such to the 
> DB. Similarily, there's no need to do a LIKE search, they match exactly.

Again, I think this has a history of needing to match for
other grabbers. I seem to remember that this needs to match
"Movies" (with an "s") and/or things like "Action Movies"
for at least some people.
 
> See filldata.cpp for currently defined values:
> (cat == "movie" || cat == "series" || cat == "sports" ||
>                         cat == "tvshow")

Followed by this comment ;-):

  /* Hack until we have the new XMLTV DTD with category "system"s.

Note also that the line you quoted is testing for things that
match and is by no means defining what is allowable. I believe
that the only category_type that is actually used for anything
is %Movie% at this point. The "category" is used for coloring
in the EPG and mythweb but that's a different topic.

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%. In DataDirect we have these
programids and prefixes (XMLTV could have passed these along but
never did).

Here is what I have for category_type filled in directly from
the TMS data:

mysql> select category_type from program group by category_type;
+------------------+
| category_type    |
+------------------+
|                  |
| Limited Series   |
| Movie            |
| Paid Programming |
| Series           |
| Short Film       |
| Special          |
+------------------+
7 rows in set (0.01 sec)

Filling in "Movie" when using DD was the point of the patch. They
had left it blank as it is implicit when programid LIKE "MV%" .

> -                        "OR programid LIKE \"MV\%\") "

Well now, this just plain isn't any of your business. If there
is a programid with the prefix "MV" then it absolutely is a movie.
If you don't have programid then this is irrelevant.

> *sigh*. I just see that it's called "showtype" and not "cat_type". I 
> don't know the internal DD grabber or what it does there, but it should 
> set the cat_type to one of the following values, if appropriate:
> 
>    * movie
>    * series (Simpsons, Star Trek etc.)
>    * sports
>    * tvshow (talkshow, cabaret etc.)

I think your assumption that  this is predetermined, fixed, or
required is incorrect. Like "category", it depends on the language,
the data source and the grabber. The only thing that is used at this
point is %Movie% or the translated word for movie that a local
grabber may use.

If you have a problem with your movie list for Search Listings->
Movies or even the Movies link in mythweb, I'd be happy to work
with you to track it down. However, in your suggestions I see
three things that could potentially break things for other people
and no indication of a solution for whatever problem you may be
seeing.

--  bjm


More information about the mythtv-dev mailing list