Genre as string rather than 2 integers?
#1
I'm struggling to see how I can convert the current "category" (aka Genre) that MythTV supports to the 2 integers that XBMC uses for the Genre.

The Genre is displayed in the information panel for a recording in XBMC and I think it might also be used for the EPG color coding?

The MythTV EPG does coloring based on the category. I personally don't think it is very useful given how poorly some shows are categorized and how many different categories there are.

The MythTV skins allow the users to provide an XML file with the list of categories and the color to use. This is presumably done because there is no standard used for categorizing content, it's purely what came along with the EPG content provider.

Does anyone know where the list of coded *EVENTMASK* Genres came from? I couldn't find anything like that from my Google searching.

How are the other PVR addons converting from their EPG sources to the 2 integers that the XBMC interface exposes? Would it be useful for other PVR addons to pass across a String or is this problem just being faced by the MythTV Addon?
Use MythTV for recording TV? Try the integrated MythTV support in XBMC Media Center. Now with commercial skip support built-in and integration with the Movie database!
Reply
#2
dteirney Wrote:The Genre is displayed in the information panel for a recording in XBMC and I think it might also be used for the EPG color coding?
it is

Quote:I personally don't think it is very useful given how poorly some shows are categorized and how many different categories there are.
it works perfectly here.

Quote:The MythTV skins allow the users to provide an XML file with the list of categories and the color to use. This is presumably done because there is no standard used for categorizing content, it's purely what came along with the EPG content provider.

Does anyone know where the list of coded *EVENTMASK* Genres came from? I couldn't find anything like that from my Google searching.
it's part of the dvb spec afaik, thought it's normally 1 integer. the only difference is that it's been split up in a type and subtype on the pvr interface.
the original type provided by the dvb stream can be split up like this:
type = (iTypeFromDVBStream & 0x0F) << 4;
subtype = iTypeFromDVBStream & 0xF0;

Quote:How are the other PVR addons converting from their EPG sources to the 2 integers that the XBMC interface exposes?
only thing I'm doing in the tvheadend add-on is splitting it up in a content type and subtype

Quote:Would it be useful for other PVR addons to pass across a String or is this problem just being faced by the MythTV Addon?
we should definitely not be using a string here.
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Reply
#3
The MediaPortal and ForTheRecord Argus pvr backends only provide genre strings and not the DVB id (even when they are available).

I started with a simple string to id/sub-id translator, but I agree with Dteirney that it ends up with a real mess. Especially with EPG information from web sources like XMLTV. Every non-DVB EPG provider seems to use their own genre definitions and even in local languages. For example MC2XML gives me non-standard Dutch genre strings.

I understand that the only way to get the color coding is via these id's but mapping all possible strings to these id's is almost impossible for us a PVR addon developers.

What I've done before (in my Dharma builds) is to try to convert the string into id/sub id and if that fails, I'm sending the genre string to XBMC. I've extended XBMC with the genre string field as suggested by dteirney but I'm only using it as backup for unavailable id/sub-id pairs. In the database, I'm not storing the genre string when the id/sub-id is available, only when I'm getting only a genre string.
The advantage of this added genre string field is that users at least can see the gerne string in the program info window. Of course we cannot color the EPG, but to my opinion the genre string fallback mechanism is better than just ignoring everything that can't be matched to DVB id/sub-id's.

Futhermore, because MythTV, Mediaportal and ForTheRecord genres are string based, it would be a good idea to come up with a common pvr support library to do the string to id/sub-id translation based on, for example, XML files. In this way XBMC users can always add their own string to id/sub-id lines.
Developer of the MediaPortal PVR addon and retired developer of the Argus-TV PVR-addon.
http://www.scintilla.utwente.nl/~marcelg/xbmc
Reply
#4
margro Wrote:What I've done before (in my Dharma builds) is to try to convert the string into id/sub id and if that fails, I'm sending the genre string to XBMC. I've extended XBMC with the genre string field as suggested by dteirney but I'm only using it as backup for unavailable id/sub-id pairs. In the database, I'm not storing the genre string when the id/sub-id is available, only when I'm getting only a genre string.
The advantage of this added genre string field is that users at least can see the gerne string in the program info window. Of course we cannot color the EPG, but to my opinion the genre string fallback mechanism is better than just ignoring everything that can't be matched to DVB id/sub-id's.
ok, we could use a string as a backup value, but it should be stored in the db too then, otherwise loading the epg could be terribly slow when restarting xbmc. if you could add that to your implementation and send me a pull req (for the current master branch ofc), I'll be happy to include it.

Quote:Futhermore, because MythTV, Mediaportal and ForTheRecord genres are string based, it would be a good idea to come up with a common pvr support library to do the string to id/sub-id translation based on, for example, XML files. In this way XBMC users can always add their own string to id/sub-id lines.
yeah I planned to create a "support lib" when the binary add-on interface is finished. a lot of things will probably have to be changed anyway then, which sounds like a perfect time to create a proper support lib.
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Reply
#5
dushmaniac Wrote:ok, we could use a string as a backup value, but it should be stored in the db too then, otherwise loading the epg could be terribly slow when restarting xbmc. if you could add that to your implementation and send me a pull req (for the current master branch ofc), I'll be happy to include it.
Yes, I'm storing the genre string in the XBMC db when both genre id's are 0.
I will forward port my genre string change to the current master code and send you a pull request.

dushmaniac Wrote:yeah I planned to create a "support lib" when the binary add-on interface is finished. a lot of things will probably have to be changed anyway then, which sounds like a perfect time to create a proper support lib.
Indeed.
Developer of the MediaPortal PVR addon and retired developer of the Argus-TV PVR-addon.
http://www.scintilla.utwente.nl/~marcelg/xbmc
Reply
#6
margro Wrote:Yes, I'm storing the genre string in the XBMC db when both genre id's are 0.
I will forward port my genre string change to the current master code and send you a pull request.


Indeed.

If there is going to be a string stored as well can it be called "category" to align with the XML DTD for XMLTV?
Use MythTV for recording TV? Try the integrated MythTV support in XBMC Media Center. Now with commercial skip support built-in and integration with the Movie database!
Reply
#7
I'd rather call it "strGenreDescription" (or something similar), to match xbmc's naming of those things.
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Reply

Logout Mark Read Team Forum Stats Members Help
Genre as string rather than 2 integers?0