[DVB EPG] Added template based naming of epg title and description (2 Viewers)

dalmer

Portal Pro
October 9, 2007
59
4
Home Country
Canada Canada
Hi Gemx. There is problem with star rating entirely. Fo NA providers, I've looked at the epg in MT and Mediaportal, and they don't even correspond to each other. I can't even find any correlation between them. I think the epgparser must be decoding that value incorrectly. Maybe it is in NA only? You'll notice the other poster is from Canada as well, so I think that is why everything looks OK to you but we see "<undefined>" all over the guide (as well as wrong ratings). I think MT is right because it gave "The Dukes of Hazzard" 2 stars and MP gave it 3...

At any rate, I've looked at the C++ portion of the code, but without any knowlege of how the epg in encoded, I can't be of much help.

Also, I would be really nice to change the "<undefined>" to string.Empty so it isn't cluttering up the guide... :)

<Edit>
I did some more digging and I think the problem may be in DecodeCombinedStarRating_MPAARatingDescriptor in epgDecoder.cpp I think the star rating code is wrong. In the comments it shows the data is based on a post in the dvbn boards. I found a later post that says the data is in bits 13-15 not 1-3:

http://dvbn.happysat.org/viewtopic.p...ating&start=45

The relavent post is:
Here is what I have found in the 0x89 descriptor (view it as a 16 bit word, big endian):

bits 13-15 of descriptor 0x89 data: star rating
000 = not rated
001 = 1 star
010 = 1.5 stars
...
111 = 4 stars

bits 10-12: MPAA rating
000 = NR/AO (pr0n)
001 = G ?
010 = PG
011 = PG-13
100 = R
101 = NC-17 ?
110 = unrated / not a movie
111 = ???

bit 9 = violent
bit 8 || bit 0 = sexual content? my 301.013 sees SC on every single movie, I think dish is screwing this up
bit 6 = nudity
bit 5 = unknown but sometimes set
bit 1 = language

I found a C program called tv_grab_dvb which, with some tweaking, parses the dish network epg/eepg into an xmltv file. It's still not all that great but I haven't found any other open source programs which do this.


This could be helpful as well:
http://board.mytheatre.ru/viewtopic.php?t=1265&highlight=star+rating

Could that be the problem for NA users? I haven't really had time to go over the code enough to see which bits it is actually using...
 

gemx

Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    Just commited the following changes:
    - changed decoding of the starrating and mpaa rating infos to the method suggested above (wrong bits were used before)
    SINCE I CAN'T CHECK IF THE CHANGES ARE CORRECT PLEASE REPORT BACK ASAP.
    - missing starrating or mpaa infos evaluate to an empty string when used in templates instead of "<unknown>" as it was before.
    Please test with snapshots from rev. 16570
     

    dalmer

    Portal Pro
    October 9, 2007
    59
    4
    Home Country
    Canada Canada
    The removal of undefined works great.

    The star rating does not. I checked the DB and it's all 0.

    Now, keep in mind that my C++ is about as rusty as the Titanic (I mostly use C# nowadays). So don't laugh if I'm way off base. I took a quick peek at the code and you've got this:

    int starRating=(int)data[3]&0xE0; // bits 13-15

    Don't you have to shift the bits before casting to an int? I'm gussing that it is creating a number thatis much larger than 7 so it always gets set to 0 a few lines down?

    Don't laugh if I'm out to lunch, I told you my c++ was rusty. :)

    EDIT:
    I finally got some time to comple and test some stuff on my own. (I was completly rebuilding my computer etc). At any rate, I believe I've got this working. I have to test against the Guide in MT, but so far the numbers look correct. I also believe I've discovered a bug in classification as it never writes anything to the DB.

    More Later... I might not be able to get back to this for a couple of days. I have a new computer comming, I'll be switching it with my current one. I'll be switching the current one with my HTPC and installing an ATI HD 2400... Lots on the go. After that, I can hopefully look at helping out geting the NA EPG tuned as long as you can help me with my rusty c++. :)

    EDIT2:
    I fixed it and uploaded the epgDecoder.cpp to the patch queue. It turns out that both links (in the comments) were correct if depending on how you interpreted them. I've found another problem though, it seems that classification never gets written to the db for some reason. If I find out more details, I'll let you know...
     

    Users who are viewing this thread

    Top Bottom