Skip to content
Browse files

Merge pull request #54 from adamsutton/master

[pvr.hts] Fix EPG genre's
  • Loading branch information...
2 parents 9e7a5ba + 42f94bc commit 6b86ea7823057c879dd24ce9ea11dc2a65bac487 @opdenkamp committed Oct 8, 2012
Showing with 8 additions and 4 deletions.
  1. +7 −3 addons/pvr.hts/src/HTSPData.cpp
  2. +1 −1 addons/pvr.hts/src/HTSPData.h
View
10 addons/pvr.hts/src/HTSPData.cpp
@@ -1038,14 +1038,18 @@ bool CHTSPData::ParseEvent(ADDON_HANDLE handle, htsmsg_t* msg, uint32_t *id, tim
age = htsmsg_get_u32_or_default(msg, "ageRating", 0);
htsmsg_get_s64(msg, "firstAired", &aired);
+ /* Fix old genre spec */
+ if (GetProtocol() < 6)
+ content = content << 4;
+
#if HTSP_DEBUGGING
XBMC->Log(LOG_DEBUG, "%s - id:%u, chan_id:%u, title:'%s', genre_type:%u, genre_sub_type:%u, desc:'%s', start:%u, stop:%u, next:%u"
, __FUNCTION__
, eventId
, channelId
, title
- , content & 0x0F
, content & 0xF0
+ , content & 0x0F
, desc
, start
, stop
@@ -1064,8 +1068,8 @@ bool CHTSPData::ParseEvent(ADDON_HANDLE handle, htsmsg_t* msg, uint32_t *id, tim
broadcast.strPlotOutline = summary ? summary : "";
broadcast.strPlot = desc ? desc : "";
broadcast.strIconPath = image ? image : "";
- broadcast.iGenreType = (content & 0x0F) << 4;
- broadcast.iGenreSubType = content & 0xF0;
+ broadcast.iGenreType = content & 0xF0;
+ broadcast.iGenreSubType = content & 0x0F;
broadcast.strGenreDescription = ""; // unused
broadcast.firstAired = (time_t) aired;
broadcast.iParentalRating = age;
View
2 addons/pvr.hts/src/HTSPData.h
@@ -103,7 +103,7 @@ class CHTSPData : public PLATFORM::CThread
void ParseChannelUpdate(htsmsg_t* msg);
void ParseDVREntryDelete(htsmsg_t* msg);
void ParseDVREntryUpdate(htsmsg_t* msg);
- static bool ParseEvent(ADDON_HANDLE handle, htsmsg_t* msg, uint32_t *id, time_t end);
+ bool ParseEvent(ADDON_HANDLE handle, htsmsg_t* msg, uint32_t *id, time_t end);
void ParseTagRemove(htsmsg_t* msg);
void ParseTagUpdate(htsmsg_t* msg);

0 comments on commit 6b86ea7

Please sign in to comment.
Something went wrong with that request. Please try again.