Index: libs/libmythtv/eithelper.cpp
===================================================================
--- libs/libmythtv/eithelper.cpp	(Revision 11451)
+++ libs/libmythtv/eithelper.cpp	(Arbeitskopie)
@@ -231,8 +231,10 @@
     for (uint i = 0; i < eit->EventCount(); i++)
     {
         // Skip event if we have already processed it before...
-        if (!eitcache->IsNewEIT(networkid, tsid, serviceid, tableid, version,
-                                eit->EventID(i), eit->EndTimeUnixUTC(i)))
+        // don't skip for Premiere EIT sid,tid are not known at this point
+        if ((tableid != TableID::PR_EIT) 
+            && (!eitcache->IsNewEIT(networkid, tsid, serviceid, tableid, version,
+                                    eit->EventID(i), eit->EndTimeUnixUTC(i))))
         {
             continue;
         }
@@ -341,27 +343,95 @@
         if (content_data)
         {
             ContentDescriptor content(content_data);
-            category      = content.GetDescription(0);
-            category_type = content.GetMythCategory(0);
+
+            // fix events without real content data for Premiere EIT
+            if ((tableid == TableID::PR_EIT) && (content.Nibble(0)==0x00)){ 
+                if(content.UserNibble(0)==0x1) 
+                {
+                    category_type = kCategoryMovie;
+                    subtitle.length() < 2 ? category = QObject::tr("Movie") : category = subtitle;
+                }
+                else if(content.UserNibble(0)==0x0) 
+                {
+                    category_type = kCategorySports;
+                    subtitle.length() < 2 ? category = QObject::tr("Sports") : category = subtitle;
+                }
+            }
+            else 
+            {   
+                category      = content.GetDescription(0);
+                category_type = content.GetMythCategory(0);
+            }
         }
 
-        uint chanid = GetChanID(
-            eit->ServiceID(), eit->OriginalNetworkID(), eit->TSID());
+        if (tableid == TableID::PR_EIT)
+        {
+            // Find all transmission descriptors for this event
+            desc_list_t transmissions =
+                MPEGDescriptor::FindAll(list, DescriptorID::pr_event_transmission);
+            for(uint j=0; j<transmissions.size(); j++)
+            {
+                PremiereTransmissionDescriptor transmission(transmissions[j]);
+                uint descriptor_length = transmission.DescriptorLength();
+                uint networkid         = transmission.OriginalNetworkID();
+                uint tsid              = transmission.TSID();
+                uint serviceid         = transmission.ServiceID();
+               
+                uint chanid = GetChanID(serviceid, networkid, tsid);
+                
+                if (!chanid)
+                {
+                    VERBOSE(VB_GENERAL, LOC + QString("No channid for NIT:%1 TID:%2 SID:%3. Possible new feed channel or wrong eit data").arg(networkid).arg(tsid).arg(serviceid));
+                    continue;
+                }
 
-        if (!chanid)
-            continue;
+                uint pos = 0; 
+                // find all transmissions for this event
+                while (pos<descriptor_length-6)
+                {
+                    unsigned char startdate[5];
+                    memcpy(startdate, transmission.StartDate(pos), 2);
+                    // get all start times on this day
+                    for (uint k=0; k<transmission.TransmissionCount(pos); k+=3)
+                    {
+                        memcpy(&startdate[2], transmission.StartTime(pos+k), 3);
+                        QDateTime starttime = MythUTCToLocal(dvbdate2qt(startdate));
+                        EITFixUp::TimeFix(starttime);
+                        QDateTime endtime   = starttime.addSecs(eit->DurationInSeconds(i));
 
-        QDateTime starttime = MythUTCToLocal(eit->StartTimeUTC(i));
-        EITFixUp::TimeFix(starttime);
-        QDateTime endtime   = starttime.addSecs(eit->DurationInSeconds(i));
+                        DBEvent *event = new DBEvent(chanid,
+                                                     title,     subtitle,      description,
+                                                     category,  category_type,
+                                                     starttime, endtime,       fix,
+                                                     false,     subtitled,
+                                                     stereo,    hdtv);
+                        db_events.enqueue(event);
+                    }
+                    // set pos to next transmission
+                    pos += 3 + transmission.TransmissionCount(pos);
+                }
+            }
+        }
+        else
+        {
+            uint chanid = GetChanID(
+                eit->ServiceID(), eit->OriginalNetworkID(), eit->TSID());
 
-        DBEvent *event = new DBEvent(chanid,
-                                     title,     subtitle,      description,
-                                     category,  category_type,
-                                     starttime, endtime,       fix,
-                                     false,     subtitled,
-                                     stereo,    hdtv);
-        db_events.enqueue(event);
+            if (!chanid)
+                continue;
+
+            QDateTime starttime = MythUTCToLocal(eit->StartTimeUTC(i));
+            EITFixUp::TimeFix(starttime);
+            QDateTime endtime   = starttime.addSecs(eit->DurationInSeconds(i));
+
+            DBEvent *event = new DBEvent(chanid,
+                                         title,     subtitle,      description,
+                                         category,  category_type,
+                                         starttime, endtime,       fix,
+                                         false,     subtitled,
+                                         stereo,    hdtv);
+            db_events.enqueue(event);
+        }
     }
 }
 
Index: libs/libmythtv/eithelper.h
===================================================================
--- libs/libmythtv/eithelper.h	(Revision 11451)
+++ libs/libmythtv/eithelper.h	(Arbeitskopie)
@@ -47,6 +47,7 @@
 class EventInformationTable;
 class ExtendedTextTable;
 class DVBEventInformationTable;
+class DVBPremiereEventInformationTable;
 
 class EITHelper
 {
Index: libs/libmythtv/mpeg/dvbtables.cpp
===================================================================
--- libs/libmythtv/mpeg/dvbtables.cpp	(Revision 11451)
+++ libs/libmythtv/mpeg/dvbtables.cpp	(Arbeitskopie)
@@ -165,6 +165,8 @@
     // Dish Network Long Term Future Event Information for all transports
     is_eit |= (TableID::DN_EITbego <= table_id &&
                TableID::DN_EITendo >= table_id);
+    // Premiere Event Information for option channels
+    is_eit |= TableID::PR_EIT == table_id;
 
     return is_eit;
 }
Index: libs/libmythtv/mpeg/dvbstreamdata.cpp
===================================================================
--- libs/libmythtv/mpeg/dvbstreamdata.cpp	(Revision 11451)
+++ libs/libmythtv/mpeg/dvbstreamdata.cpp	(Arbeitskopie)
@@ -137,6 +137,10 @@
         is_eit |= (TableID::DN_EITbego <= table_id &&
                    TableID::DN_EITendo >= table_id);
     }
+    if (DVB_PR_SPORT_EIT_PID == pid || DVB_PR_DIRECT_EIT_PID == pid)
+    {
+        is_eit |= TableID::PR_EIT == table_id;
+    }
     if (is_eit)
     {
         uint service_id = psip.TableIDExtension();
@@ -292,6 +296,27 @@
         return true;
     }
 
+    if ((DVB_PR_SPORT_EIT_PID || DVB_PR_DIRECT_EIT_PID) &&
+        DVBEventInformationTable::IsEIT(psip.TableID()))
+    {
+        QMutexLocker locker(&_listener_lock);
+        if (!_dvb_eit_listeners.size() && !_eit_helper)
+            return true;
+
+        uint service_id = psip.TableIDExtension();
+        SetVersionEIT(psip.TableID(), service_id, psip.Version());
+        SetEITSectionSeen(psip.TableID(), service_id, psip.Section());
+
+        DVBPremiereEventInformationTable eit(psip);
+        for (uint i = 0; i < _dvb_eit_listeners.size(); i++)
+            _dvb_eit_listeners[i]->HandleEIT(&eit);
+
+        if (_eit_helper)
+            _eit_helper->AddEIT(&eit);
+
+        return true;
+    }
+
     return false;
 }
 
@@ -337,6 +362,16 @@
         {
             add_pids.push_back(DVB_DNLONG_EIT_PID);
         }
+        if (find(cur_pids.begin(), cur_pids.end(),
+                 (uint) DVB_PR_SPORT_EIT_PID) == cur_pids.end())
+        {
+            add_pids.push_back(DVB_PR_SPORT_EIT_PID);
+        }
+        if (find(cur_pids.begin(), cur_pids.end(),
+                 (uint) DVB_PR_DIRECT_EIT_PID) == cur_pids.end())
+        {
+            add_pids.push_back(DVB_PR_DIRECT_EIT_PID);
+        }
     }
     else
     {
@@ -352,6 +387,16 @@
         {
             del_pids.push_back(DVB_DNLONG_EIT_PID);
         }
+        if (find(cur_pids.begin(), cur_pids.end(),
+                 (uint) DVB_PR_SPORT_EIT_PID) != cur_pids.end())
+        {
+            del_pids.push_back(DVB_PR_SPORT_EIT_PID);
+        }
+        if (find(cur_pids.begin(), cur_pids.end(),
+                 (uint) DVB_PR_DIRECT_EIT_PID) != cur_pids.end())
+        {
+            del_pids.push_back(DVB_PR_DIRECT_EIT_PID);
+        }
     }
 
     return add_pids.size() || del_pids.size();
Index: libs/libmythtv/mpeg/mpegtables.h
===================================================================
--- libs/libmythtv/mpeg/mpegtables.h	(Revision 11451)
+++ libs/libmythtv/mpeg/mpegtables.h	(Arbeitskopie)
@@ -186,6 +186,10 @@
     // Dishnet longterm EIT is on pid 0x300
     DVB_DNLONG_EIT_PID = 0x0300,
 
+    // Premiere EIT for Direct/Sport PPV
+    DVB_PR_DIRECT_EIT_PID = 0x0b11,
+    DVB_PR_SPORT_EIT_PID = 0x0b12,
+
     ATSC_PSIP_PID = 0x1ffb,
 };
 
@@ -231,6 +235,9 @@
         // Dishnet Longterm EIT data
         DN_EITbego = 0x80, // always on pid 0x300
         DN_EITendo = 0xfe, // always on pid 0x300
+        
+        // Premiere Eit for Direct and Sport
+        PR_EIT     = 0xA0,
 
         // ATSC
         STUFFING = 0x80,
Index: libs/libmythtv/mpeg/dvbdescriptors.h
===================================================================
--- libs/libmythtv/mpeg/dvbdescriptors.h	(Revision 11451)
+++ libs/libmythtv/mpeg/dvbdescriptors.h	(Arbeitskopie)
@@ -1651,4 +1651,40 @@
     QString toString() const { return QString("UKChannelListDescriptor(stub)"); }
 };
 
+class PremiereTransmissionDescriptor : public MPEGDescriptor
+{
+  public:
+    PremiereTransmissionDescriptor(const unsigned char* data) : MPEGDescriptor(data)
+    {
+    //       Name             bits  loc  expected value
+    // descriptor_tag           8   0.0       0xF2
+        assert(DescriptorID::pr_event_transmission == DescriptorTag());
+    // descriptor_length        8   1.0
+    }
+
+    // transport id            16   2.0
+    uint TSID() const
+        { return (_data[2] << 8) | _data[3]; }
+    // network id              16   4.0
+    uint OriginalNetworkID() const
+        { return (_data[4] << 8) | _data[5]; }
+    // service id              16   6.0
+    uint ServiceID() const
+        { return (_data[6] << 8) | _data[7]; }
+
+    // for(i=0;i<N;i+=2+1+count) 
+    // start date              16   8.0
+    const unsigned char* StartDate(uint i) const
+        { return &_data[8 + i]; }  
+    // transmission count       8  10.0
+    uint TransmissionCount(uint i) const
+        { return (_data[10 + i]); }
+    // start_time              24  11.0+x
+    const unsigned char* StartTime(uint i) const
+        { return &_data[11 + i];  }
+      
+    QString toString() const { return QString("TransmissionDescriptor(stub)"); }
+};
+
+
 #endif
Index: libs/libmythtv/mpeg/dvbtables.h
===================================================================
--- libs/libmythtv/mpeg/dvbtables.h	(Revision 11451)
+++ libs/libmythtv/mpeg/dvbtables.h	(Arbeitskopie)
@@ -219,16 +219,17 @@
     // last_section_number      8   7.0
         Parse();
     }
+    virtual ~DVBEventInformationTable(){}
 
     // service_id              16   3.0
-    uint ServiceID(void) const { return TableIDExtension(); }
+    virtual uint ServiceID(void) const { return TableIDExtension(); }
 
     // transport_stream_id     16   8.0
-    uint TSID(void) const
+    virtual uint TSID(void) const
         { return (psipdata()[0]<<8) | psipdata()[1]; }
 
     // original_network_id     16  10.0
-    uint OriginalNetworkID(void) const
+    virtual uint OriginalNetworkID(void) const
         { return (psipdata()[2]<<8) | psipdata()[3]; }
 
     // segment_last_section_num 8  12.0
@@ -238,7 +239,7 @@
     uint LastTableID(void) const
         { return psipdata()[5]; }
 
-    uint EventCount() const { return _ptrs.size()-1; }
+    virtual uint EventCount() const { return _ptrs.size()-1; }
 
     // for(i=0;i<N;i++) {
     //   event_id              16   0.0+x
@@ -258,7 +259,7 @@
     //   duration              24   7.0+x
     const unsigned char *Duration(uint i) const
         { return _ptrs[i]+7; }
-    uint DurationInSeconds(uint i) const
+    virtual uint DurationInSeconds(uint i) const
     {
         return ((byteBCD2int(Duration(i)[0]) * 3600) +
                 (byteBCD2int(Duration(i)[1]) * 60) +
@@ -269,16 +270,16 @@
     //   free_CA_mode           1  10.3+x
     bool IsScrambled(uint i) const { return bool(_ptrs[i][10] & 0x10); }
     //   descriptors_loop_len  12  10.4+x
-    uint DescriptorsLength(uint i) const
+    virtual uint DescriptorsLength(uint i) const
         { return ((_ptrs[i][10]<<8) | (_ptrs[i][11])) & 0xfff; }
     //   for(i=0;i<N;i++)       y  12.0+x
     //     { descriptor() }
-    const unsigned char* Descriptors(uint i) const
+    virtual const unsigned char* Descriptors(uint i) const
         { return _ptrs[i] + 12; }
     //   }
     //CRC_32 32 rpchof
 
-    void Parse(void) const;
+    virtual void Parse(void) const;
 
     static bool IsEIT(uint table_id);
 
@@ -286,5 +287,50 @@
     mutable vector<const unsigned char*> _ptrs; // used to parse
 };
 
+class DVBPremiereEventInformationTable : public DVBEventInformationTable
+{
+  public:
+    DVBPremiereEventInformationTable(const DVBEventInformationTable& table) : DVBEventInformationTable(table)
+    {
+    // table_id                 8   0.0       0xA0
+        assert(IsEIT(TableID()));
+    // section_syntax_indicator 1   1.0          1
+    // private_indicator        1   1.1          1
+    // reserved                 2   1.2          3
+    // section_length          12   1.4
+    // reserved                 2   5.0          3
+    // version_number           5   5.2
+    // current_next_indicator   1   5.7          1
+    // section_number           8   6.0
+    // last_section_number      8   7.0
+        Parse();
+    }
+    ~DVBPremiereEventInformationTable(){}
 
+    // content_id              32   0.0
+    uint ContentID(void) const
+        { return (psipdata()[0]<<24) | (psipdata()[1]<<16) | (psipdata()[2]<<8) | psipdata()[3]; }
+
+    // return dummy values for compatitbility
+    uint ServiceID(void) const { return 18; }
+    uint OriginalNetworkID(void) const { return 133; }
+    uint TSID(void) const { return 4; }
+    uint EventCount(void) const { return 1; }
+
+    // event_duration          24   4.0
+    uint DurationInSeconds(uint i) const 
+        { return ((byteBCD2int(psipdata()[4]) * 3600) +
+                  (byteBCD2int(psipdata()[5]) * 60) +
+                  (byteBCD2int(psipdata()[6]))); }
+
+    // descriptor length        7   8.0
+    uint DescriptorsLength(uint i) const
+        { return ((psipdata()[7] & 0x0F) << 8) | psipdata()[8]; }
+
+    // descriptor length        x   9.0
+    const unsigned char* Descriptors(uint i) const
+        { return &psipdata()[9]; }
+
+    void Parse(void) const {};
+};
 #endif // _DVB_TABLES_H_
Index: libs/libmythtv/mpeg/mpegdescriptors.h
===================================================================
--- libs/libmythtv/mpeg/mpegdescriptors.h	(Revision 11451)
+++ libs/libmythtv/mpeg/mpegdescriptors.h	(Arbeitskopie)
@@ -129,6 +129,9 @@
         DCC_arriving_request        = 0xA9,
         DRM_control                 = 0xAA,
         atsc_content_identifier     = 0xB6,
+
+        // PREMIERE
+        pr_event_transmission       = 0xF2,
     };
 };
 

