diff -uNbw vdr-1.5.14/eit.c vdr-1.5.14-starRating/eit.c --- vdr-1.5.14/eit.c 2008-02-03 19:13:56.000000000 -0500 +++ vdr-1.5.14-starRating/eit.c 2008-02-16 14:18:56.000000000 -0500 @@ -192,6 +192,10 @@ break; case SI::ParentalRatingDescriptorTag: break; + case 0x89: + if (d->getLength() == 4) + pEvent->SetRating(d->getData().TwoBytes(2)); + break; case SI::PDCDescriptorTag: { SI::PDCDescriptor *pd = (SI::PDCDescriptor *)d; time_t now = time(NULL); diff -uNbw vdr-1.5.14/epg.c vdr-1.5.14-starRating/epg.c --- vdr-1.5.14/epg.c 2008-02-03 19:13:42.000000000 -0500 +++ vdr-1.5.14-starRating/epg.c 2008-02-16 14:16:29.000000000 -0500 @@ -257,7 +258,7 @@ void cEvent::Dump(FILE *f, const char *Prefix, bool InfoOnly) const { if (InfoOnly || startTime + duration + Setup.EPGLinger * 60 >= time(NULL)) { - fprintf(f, "%sE %u %ld %d %X %X\n", Prefix, eventID, startTime, duration, tableID, version); + fprintf(f, "%sE %u %ld %d %X %X %.4hX\n", Prefix, eventID, startTime, duration, tableID, version, rating); if (!isempty(title)) fprintf(f, "%sT %s\n", Prefix, title); if (!isempty(shortText)) @@ -322,8 +323,9 @@ int Duration; unsigned int TableID = 0; unsigned int Version = 0xFF; // actual value is ignored - int n = sscanf(t, "%u %ld %d %X %X", &EventID, &StartTime, &Duration, &TableID, &Version); + u_int16_t Rating; + int n = sscanf(t, "%u %ld %d %X %X %hX", &EventID, &StartTime, &Duration, &TableID, &Version, &Rating); - if (n >= 3 && n <= 5) { + if (n >= 3 && n <= 6) { Event = (cEvent *)Schedule->GetEvent(EventID, StartTime); cEvent *newEvent = NULL; if (Event) @@ -336,6 +338,7 @@ Event->SetTableID(TableID); Event->SetStartTime(StartTime); Event->SetDuration(Duration); + Event->SetRating(Rating); if (newEvent) Schedule->AddEvent(newEvent); } diff -uNbw vdr-1.5.14/epg.h vdr-1.5.14-starRating/epg.h --- vdr-1.5.14/epg.h 2006-10-07 09:47:19.000000000 -0400 +++ vdr-1.5.14-starRating/epg.h 2008-02-16 14:12:55.000000000 -0500 @@ -66,6 +66,7 @@ int duration; // Duration of this event in seconds time_t vps; // Video Programming Service timestamp (VPS, aka "Programme Identification Label", PIL) time_t seen; // When this event was last seen in the data stream + u_int16_t rating; // Dish/BEV Parental Rating public: cEvent(tEventID EventID); ~cEvent(); @@ -109,6 +110,8 @@ bool Parse(char *s); static bool Read(FILE *f, cSchedule *Schedule); void FixEpgBugs(void); + u_int16_t Rating(void) const { return rating; } + void SetRating(u_int16_t Rating) { rating = Rating; } }; class cSchedules;