Navigation Menu

Skip to content

Commit

Permalink
Merge pull request opdenkamp#54 from adamsutton/master
Browse files Browse the repository at this point in the history
[pvr.hts] Fix EPG genre's
  • Loading branch information
Lars Op den Kamp committed Oct 9, 2012
2 parents 9e7a5ba + 42f94bc commit 6b86ea7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions addons/pvr.hts/src/HTSPData.cpp
Expand Up @@ -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
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion addons/pvr.hts/src/HTSPData.h
Expand Up @@ -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);

Expand Down

0 comments on commit 6b86ea7

Please sign in to comment.