Ticket #4327: eitfixup10.patch

File eitfixup10.patch, 4.8 KB (added by John {at} Pullan {dot} org , 13 years ago)

update of patch

  • libs/libmythtv/eitfixup.cpp

     
    1515      m_bellPPVDescriptionAllDay("^\\(.*\\sEastern\\)"),
    1616      m_bellPPVDescriptionAllDay2("^\\([0-9].*am-[0-9].*am\\sET\\)"),
    1717      m_bellPPVDescriptionEventId("\\([0-9]{5}\\)"),
    18       m_ukSubtitle("\\[.*S\\]"),
    1918      m_ukThen("\\s*(Then|Followed by) 60 Seconds\\.", false),
    2019      m_ukNew("\\s*(Brand New|New)\\s*(Series|Episode)\\s*[:\\.\\-]",false),
    21       m_ukNew1("^New\\."),
     20      m_ukNew1("New\\."),
    2221      m_ukT4("^[tT]4:"),
    2322      m_ukEQ("[:\\!\\?]"),
    2423      m_ukEPQ("[:\\!\\.\\?]"),
     
    4140      m_ukDoubleDotStart("^\\.\\.+"),
    4241      m_ukDotSpaceStart("^\\. "),
    4342      m_ukTime("\\d{1,2}[\\.:]\\d{1,2}\\s*(am|pm|)"),
     43      m_ukBBC3("BBC THREE on BBC TWO\\.",false),
     44      m_ukBBC4("BBC FOUR on BBC TWO\\.",false),
     45      m_ukBBCSwitch("BBC Switch\\."),
    4446      m_comHemCountry("^(\\(.+\\))?\\s?([^ ]+)\\s([^\\.0-9]+)"
    4547                      "(?:\\sfrån\\s([0-9]{4}))(?:\\smed\\s([^\\.]+))?\\.?"),
    4648      m_comHemDirector("[Rr]egi"),
     
    344346    int position2;
    345347    QString strFull;
    346348
    347     position1 = event.description.find(m_ukSubtitle);
    348     if (position1 != -1)
    349     {
    350         event.flags |= DBEvent::kSubtitled;
    351         event.description.remove(m_ukSubtitle);
    352     }
    353 
    354349    // BBC three case (could add another record here ?)
    355350    event.description = event.description.remove(m_ukThen);
    356351    event.description = event.description.remove(m_ukNew);
     
    362357    event.description = event.description.remove(m_ukCBBC);
    363358    event.description = event.description.remove(m_ukCBeebies);
    364359
     360    // Removal of BBC FOUR and BBC THREE
     361    event.description = event.description.remove(m_ukBBC4);
     362    event.description = event.description.remove(m_ukBBC3);
     363
     364    // Removal of BBC Switch
     365    event.description = event.description.remove(m_ukBBCSwitch);
     366   
    365367    // BBC 7 [Rpt of ...] case.
    366368    event.description = event.description.remove(m_ukBBC7rpt);
    367369
     
    369371    event.description = event.description.stripWhiteSpace();
    370372
    371373    QRegExp tmp24ep = m_uk24ep;
    372     if (!event.title.startsWith("CSI:") && !event.title.startsWith("CD:"))
     374    if (!event.title.startsWith("CSI:") && !event.title.startsWith("CD:") &&
     375        !event.title.startsWith("Non-Stop Q Music 24/7"))
    373376    {
    374377        if (((position1=event.title.find(m_ukDoubleDotEnd)) != -1) &&
    375378            ((position2=event.description.find(m_ukDoubleDotStart)) != -1))
     
    383386                     position1++;
    384387                 event.title = strFull.left(position1);
    385388                 event.description = strFull.mid(position1 + 1);
    386                  event.description = event.description.remove(m_ukNew1);
    387389                 SetUKSubtitle(event);
    388390            }
    389391            if ((position1 = strFull.find(m_ukYear)) != -1)
     
    515517        {
    516518            event.partnumber = tmpExp1.cap(1).toUInt();
    517519            event.parttotal  = tmpExp1.cap(2).toUInt();
     520            // Remove from the description
     521            event.description = event.description.left(position1) +
     522                event.description.mid(position1+tmpExp1.cap(0).length());
    518523            series = true;
    519524        }
    520525    }
     
    522527    {
    523528        event.partnumber = tmpExp2.cap(2).toUInt();
    524529        event.parttotal  = tmpExp2.cap(3).toUInt();
     530        // Remove from the description
     531        event.description = event.description.left(position1) +
     532            event.description.mid(position1+tmpExp2.cap(0).length());
    525533        series = true;
    526534    }
    527535    else if ((position1 = tmpExp3.search(event.description)) != -1)
    528536    {
    529537        event.partnumber = tmpExp3.cap(1).toUInt();
    530538        event.parttotal  = tmpExp3.cap(2).toUInt();
     539        // Remove from the description
     540        event.description = event.description.left(position1) +
     541            event.description.mid(position1+tmpExp3.cap(0).length());
    531542        series = true;
    532543    }
    533544    if (series)
  • libs/libmythtv/eitfixup.h

     
    7979    const QRegExp m_bellPPVDescriptionAllDay;
    8080    const QRegExp m_bellPPVDescriptionAllDay2;
    8181    const QRegExp m_bellPPVDescriptionEventId;
    82     const QRegExp m_ukSubtitle;
    8382    const QRegExp m_ukThen;
    8483    const QRegExp m_ukNew;
    8584    const QRegExp m_ukNew1;
     
    104103    const QRegExp m_ukDoubleDotStart;
    105104    const QRegExp m_ukDotSpaceStart;
    106105    const QRegExp m_ukTime;
     106    const QRegExp m_ukBBC3;
     107    const QRegExp m_ukBBC4;
     108    const QRegExp m_ukBBCSwitch;
    107109    const QRegExp m_comHemCountry;
    108110    const QRegExp m_comHemDirector;
    109111    const QRegExp m_comHemActor;