Index: libs/libmythtv/eit.h
===================================================================
--- libs/libmythtv/eit.h	(Revision 11241)
+++ libs/libmythtv/eit.h	(Arbeitskopie)
@@ -130,7 +130,7 @@
     uint32_t      chanid;
     uint16_t      partnumber;
     uint16_t      parttotal;
-    unsigned char fixup;
+    uint16_t      fixup;
     unsigned char flags;
     unsigned char category_type;
 
Index: libs/libmythtv/eitfixup.cpp
===================================================================
--- libs/libmythtv/eitfixup.cpp	(Revision 11241)
+++ libs/libmythtv/eitfixup.cpp	(Arbeitskopie)
@@ -38,7 +38,19 @@
       m_comHemSeries1("\\s?(?:[dD]el|[eE]pisode)\\s([0-9]+)"
                       "(?:\\s?(?:/|:|av)\\s?([0-9]+))?\\."),
       m_comHemSeries2("\\s?-?\\s?([Dd]el\\s+([0-9]+))"),
-      m_comHemTSub("\\s+-\\s+([^\\-]+)")
+      m_comHemTSub("\\s+-\\s+([^\\-]+)"),
+      m_kdEpisode("[\\(]{1}[0-9]+[\\)]{1}"),
+      m_kdPartTotal("([0-9]+)\\s(?:Episoden|Folgen|Teile)"),
+      m_kdPartNumber("(?:Episode|Folge|Teil)\\s([0-9]+)"),
+      m_kdInfos("^([^;]+)\\*"),
+      m_kdOTitle("^(\\([^\\)]+\\))"),
+      m_kdSubtitle("^([^\\(\\)]+)"),
+      m_kdActors("(?:Mit|G[aä]st[e]?:)\\s(.+\\w+)\\s"),
+      m_kdDirector("R:\\s(.+)\\s"),
+      m_kdHost("(?:Moderation:|Presented by)\\s(.+)\\s"),
+      m_kdCategory("^([\\w-]+\\s?\\w*)(?: nach| mit| frei nach| von|$)"),
+      m_kdCatCountryYear("([\\w-]+\\s?\\w*)(?:(?: nach| mit| frei nach| von)[^,]+)?,\\s([A-Z/]+)(?:\\s([0-9-/]{4,}))?(?:,\\s[0-9]+\\sMinuten,?)?(?:,|\\s\\*|$|\\s)"),
+      m_prInfos("([^.]+)?\\s?([0-9]{4})\\.\\s[0-9]+\\sMin\\.(?:\\sVon\\s([^,]+)(?:,|\\su\\.\\sa\\.)\\smit\\s(.+)\\.)?")
 {
 }
 
@@ -70,6 +82,9 @@
 
     if (kFixAUStar & event.fixup)
         FixAUStar(event);
+    
+    if (kEFixPro7Sat & event.fixup)
+        FixPro7Sat(event);
 
     if (event.fixup)
     {
@@ -630,3 +645,141 @@
         event.description    = stmp.right(stmp.length() - position - 2);
     }
 }
+
+/** \fn EITFixUp::FixPro7Sat(DBEvent&) const
+ *  \brief Use this to standardize DVB-C guide in Germany
+ *         for the providers Kabel Deutschland and Premiere.
+ */
+void EITFixUp::FixPro7Sat(DBEvent &event) const
+{
+    QString country = "";
+    QString possible_subtitle = "";
+    QString replacement = "";
+    // Episodes
+    QRegExp tmpPartTotal = m_kdPartTotal;
+    if (tmpPartTotal.search(event.description)!= -1)
+    {
+        QStringList parttotal = tmpPartTotal.capturedTexts();
+        event.parttotal = parttotal[1].toUInt();
+    }
+    // Episode Number
+    QRegExp tmpPartNumber = m_kdPartNumber;
+    if (tmpPartNumber.search(event.description)!= -1)
+    {
+        QStringList partnumber = tmpPartNumber.capturedTexts();
+        event.partnumber = partnumber[1].toUInt();
+    }
+    // Find infos about Category, Country and Year (Kabel Deutschland)
+    QRegExp tmpCatCountryYear = m_kdCatCountryYear;
+    if ((tmpCatCountryYear.search(event.subtitle)!= -1)||(tmpCatCountryYear.search(event.description)!= -1))
+    {
+        QStringList catcountryyear = tmpCatCountryYear.capturedTexts();
+        if (event.category.isEmpty())
+            event.category = catcountryyear[1];
+        if (catcountryyear[2].length()>0)
+            country = catcountryyear[2];
+        if (catcountryyear[3].length()>0)
+            event.airdate  = catcountryyear[3];
+        event.subtitle = event.subtitle.replace(catcountryyear[0],"");
+        event.description = event.description.replace(catcountryyear[0],"");
+    }
+    
+    // Find infos about Country, Credits and Year (Premiere)
+    QRegExp tmpInfos =  m_prInfos;
+    if (tmpInfos.search(event.description)!=-1)
+    {
+        QStringList list = tmpInfos.capturedTexts();
+        country = list[1];
+        event.airdate = list[2];
+        event.AddPerson(DBPerson::kDirector, list[3]);
+        QStringList actors = QStringList::split(", ", list[4]);
+        for(QStringList::size_type j=0;j<actors.count();j++)
+            event.AddPerson(DBPerson::kActor, actors[j]);
+        event.description = event.description.replace(list[0],"");
+    }
+
+    // Find extra infos (category, credits, subtitle, original title)
+    tmpInfos =  m_kdInfos;
+    if (tmpInfos.search(event.description)!=-1)
+    {
+        QStringList list = tmpInfos.capturedTexts();
+        QStringList infos;
+        infos = QStringList::split("*", list[1]);
+        
+        QRegExp tmpDirector = m_kdDirector;
+        QRegExp tmpHost     = m_kdHost;
+        QRegExp tmpActor    = m_kdActors;
+        QRegExp tmpOTitle   = m_kdOTitle;
+        QRegExp tmpCategory = m_kdCategory;
+        QRegExp tmpSubtitle = m_kdSubtitle;
+         
+        for(QStringList::size_type i=0;i<infos.count();i++)
+        {
+            if (tmpDirector.search(infos[i])!=-1)
+            {
+                QStringList director = tmpDirector.capturedTexts();
+                event.AddPerson(DBPerson::kDirector, director[1]);
+                event.description = event.description.replace(infos[i]+"*","");
+            } 
+            else if (tmpHost.search(infos[i])!=-1)
+            {
+                QStringList host = tmpHost.capturedTexts();
+                event.AddPerson(DBPerson::kHost, host[1]);
+                event.description = event.description.replace(infos[i]+"*","");
+            } 
+            else if (tmpActor.search(infos[i])!=-1)
+            {
+                QStringList actorlist = tmpActor.capturedTexts();
+                QStringList actors = QStringList::split(", ", actorlist[1]);
+                for(QStringList::size_type j=0;j<actors.count();j++)
+                    event.AddPerson(DBPerson::kActor, actors[j]);
+                event.description = event.description.replace(infos[i]+"*","");
+            } 
+            else if (tmpOTitle.search(infos[i])!=-1)
+            {
+                QStringList origtitle = tmpOTitle.capturedTexts();
+                event.title += " " + origtitle[1];
+                event.description = event.description.replace(infos[i]+"*","");
+            } 
+            else if (event.category.isEmpty() && (tmpCategory.search(infos[i])!=-1))
+            {
+                QStringList category = tmpCategory.capturedTexts();
+                event.category = category[1];
+                event.description = event.description.replace(infos[i]+"*","");
+            }
+            else if (tmpSubtitle.search(infos[i])!=-1)
+            {
+                possible_subtitle = tmpSubtitle.capturedTexts()[1];
+                replacement = infos[i];
+            }
+        }
+
+    } 
+    if (event.category.isEmpty()&&!event.subtitle.isEmpty())
+    {
+        QRegExp tmpCategory = m_kdCategory;
+        if (tmpCategory.search(event.subtitle)!=-1)
+        {
+            event.category = event.subtitle;
+            event.subtitle = "";
+        }
+    }
+    if (event.subtitle.isEmpty()&&!possible_subtitle.isEmpty())
+    {
+            event.subtitle = possible_subtitle; 
+            event.description = event.description.replace(replacement+"*","");
+    }
+
+    // write found country at the description end   
+    if (!country.isEmpty()) 
+      event.description += " " + country;
+    
+
+    // Get Episode Number from event title
+    int position = event.title.find(m_kdEpisode);
+    if (position != -1)
+    {
+        event.partnumber = event.title.mid(position + 1, event.title.length() - position - 2).toUInt();
+        event.title = event.title.left(position);
+    }
+}
Index: libs/libmythtv/eithelper.cpp
===================================================================
--- libs/libmythtv/eithelper.cpp	(Revision 11241)
+++ libs/libmythtv/eithelper.cpp	(Arbeitskopie)
@@ -518,6 +518,17 @@
     fix[ 769LL << 32 | 8468 << 16] = EITFixUp::kEFixPro7Sat; // DVB-T Berlin
     fix[3075LL << 32 | 8468 << 16] = EITFixUp::kEFixPro7Sat; // DVB-T Bremen
     fix[                133 << 16] = EITFixUp::kEFixPro7Sat; // Premiere and pro7/Sat.1 
+    fix[10000LL << 32 | 61441U << 16] = EITFixUp::kEFixPro7Sat; // Kabeldeutschland
+    fix[10001LL << 32 | 61441U << 16] = EITFixUp::kEFixPro7Sat; // Kabeldeutschland
+    fix[10002LL << 32 | 61441U << 16] = EITFixUp::kEFixPro7Sat; // Kabeldeutschland
+    fix[10003LL << 32 | 61441U << 16] = EITFixUp::kEFixPro7Sat; // Kabeldeutschland
+    fix[10004LL << 32 | 61441U << 16] = EITFixUp::kEFixPro7Sat; // Kabeldeutschland
+    fix[10005LL << 32 | 61441U << 16] = EITFixUp::kEFixPro7Sat; // Kabeldeutschland
+    fix[10006LL << 32 | 61441U << 16] = EITFixUp::kEFixPro7Sat; // Kabeldeutschland
+    fix[10008LL << 32 | 61441U << 16] = EITFixUp::kEFixPro7Sat; // Kabeldeutschland
+    fix[10009LL << 32 | 61441U << 16] = EITFixUp::kEFixPro7Sat; // Kabeldeutschland
+    fix[61441U << 16 | 53608U] = EITFixUp::kEFixPro7Sat; // Kabeldeutschland
+    fix[61441U << 16 | 53605U] = EITFixUp::kEFixPro7Sat; // Kabeldeutschland 
 }
 
 static int calc_eit_utc_offset(void)
Index: libs/libmythtv/eitfixup.h
===================================================================
--- libs/libmythtv/eitfixup.h	(Revision 11241)
+++ libs/libmythtv/eitfixup.h	(Arbeitskopie)
@@ -51,6 +51,7 @@
     void FixPBS(DBEvent &event) const;           // USA ATSC
     void FixComHem(DBEvent &event, bool parse_subtitle) const; // Sweden DVB-C
     void FixAUStar(DBEvent &event) const;        // Australia DVB-S
+    void FixPro7Sat(DBEvent &event) const;       // German DVB-C
 
     const QRegExp m_bellYear;
     const QRegExp m_bellActors;
@@ -80,6 +81,19 @@
     const QRegExp m_comHemSeries1;
     const QRegExp m_comHemSeries2;
     const QRegExp m_comHemTSub;
+    const QRegExp m_kdEpisode;
+    const QRegExp m_kdPartTotal;
+    const QRegExp m_kdPartNumber;
+    const QRegExp m_kdInfos;
+    const QRegExp m_kdStereo;
+    const QRegExp m_kdOTitle;
+    const QRegExp m_kdSubtitle;
+    const QRegExp m_kdActors;
+    const QRegExp m_kdDirector;
+    const QRegExp m_kdHost;
+    const QRegExp m_kdCategory;
+    const QRegExp m_kdCatCountryYear;
+    const QRegExp m_prInfos;
 };
 
 #endif // EITFIXUP_H

