summaryrefslogtreecommitdiff
path: root/eepg.c
diff options
context:
space:
mode:
authorDimitar Petrovski <dimeptr@gmail.com>2011-07-19 22:01:18 +0200
committerDimitar Petrovski <dimeptr@gmail.com>2011-07-19 22:01:18 +0200
commitc030237380d362702670105982fa3e652681b40e (patch)
tree77b4e036d4d919c0a4066dde85eddde3c214e46d /eepg.c
parent2dd33fc339b1eb2d1f04049724057da4a9607b7b (diff)
downloadvdr-plugin-eepg-c030237380d362702670105982fa3e652681b40e.tar.gz
vdr-plugin-eepg-c030237380d362702670105982fa3e652681b40e.tar.bz2
set premiere parental rating using VDR api
Diffstat (limited to 'eepg.c')
-rw-r--r--eepg.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/eepg.c b/eepg.c
index 4820be1..6786d1f 100644
--- a/eepg.c
+++ b/eepg.c
@@ -3478,6 +3478,7 @@ void cFilterEEPG::Process (u_short Pid, u_char Tid, const u_char * Data, int Len
cSchedules *Schedules = (cSchedules *) cSchedules::Schedules (SchedulesLock);
if (Schedules) {
int nCount = 0;
+ int nRating = 0;
SI::ExtendedEventDescriptors * ExtendedEventDescriptors = 0;
SI::ShortEventDescriptor * ShortEventDescriptor = 0;
char *order = 0, *rating = 0;
@@ -3516,8 +3517,8 @@ void cFilterEEPG::Process (u_short Pid, u_char Tid, const u_char * Data, int Len
char buff[512];
int p = 0;
const unsigned char *data = d->getData ().getData () + 2;
- p +=
- snprintf (&buff[p], sizeof (buff) - p, "\n%s: %d %s", tr ("Rating"), data[0] + 3, tr ("years"));
+ nRating = data[0] + 3;
+ p += snprintf (&buff[p], sizeof (buff) - p, "\n%s: %d %s", tr ("Rating"), nRating, tr ("years"));
data += 7;
int l = data[0];
if (l > 0)
@@ -3704,8 +3705,10 @@ void cFilterEEPG::Process (u_short Pid, u_char Tid, const u_char * Data, int Len
buffer[0] = 0;
if (pEvent->Description ())
strcat (buffer, pEvent->Description ());
- if (rating)
+ if (rating) {
strcat (buffer, rating);
+ pEvent->SetParentalRating(nRating);
+ }
if (order)
strcat (buffer, order);
pEvent->SetDescription (buffer);