Ticket #8483: backport-changeset_r24121.2.diff

File backport-changeset_r24121.2.diff, 2.8 KB (added by Håkon Alstadheim <hakon@…>, 14 years ago)

Well, this is embarassing. New version of backport, with small bugfix and a bit tidier.

  • libs/libmythtv/eitfixup.cpp

     
    103103      m_nlYear2("([\\s]{1}[\\(]{1}[A-Z]{0,3}/?)([1-2]{2}[0-9]{2})([\\)]{1})"),
    104104      m_nlDirector("(?=\\svan\\s)(([A-Z]{1}[a-z]+\\s)|([A-Z]{1}\\.\\s))"),
    105105      m_nlCat("^(Amusement|Muziek|Informatief|Nieuws/actualiteiten|Jeugd|Animatie|Sport|Serie/soap|Kunst/Cultuur|Documentaire|Film|Natuur|Erotiek|Comedy|Misdaad|Religieus)\\.\\s"),
    106       m_nlOmroep ("\\s\\(([A-Z]+/?)+\\)$")
     106      m_nlOmroep ("\\s\\(([A-Z]+/?)+\\)$"),
     107      m_noRerun(" \\(R\\)")
    107108
    108109{
    109110}
     
    155156    if (kFixNL & event.fixup)
    156157        FixNL(event);
    157158
     159    if (kFixNO & event.fixup)
     160        FixNO(event);
     161
    158162    if (event.fixup)
    159163    {
    160164        if (!event.title.isEmpty())
     
    14831487    event.subtitle    = event.subtitle.trimmed();
    14841488
    14851489}
     1490
     1491/** \fn EITFixUp::FixNO(DBEventEIT&) const
     1492 *  \brief Use this to clean DVB-S guide in Norway.
     1493 */
     1494void EITFixUp::FixNO(DBEventEIT &event) const
     1495{
     1496    // Check for "title (R)" in the title
     1497    int position = event.title.indexOf(m_noRerun);
     1498    if (position != -1)
     1499    {
     1500      event.previouslyshown = true;
     1501      event.title = event.title.replace(m_noRerun, "");
     1502    }
     1503}
     1504
  • libs/libmythtv/eithelper.cpp

     
    773773        fix[    15U << 16] = // DVB-C Welho
    774774        EITFixUp::kFixFI;
    775775
     776    // DVB-S(2) Thor 0.8W Norwegian
     777    fix[70U << 16] = EITFixUp::kFixNO;
     778
    776779    ///////////////////////////////////////////////////////////////////////////
    777780    // Special Early fixups for providers that break DVB EIT spec.
    778781    // transport_id<<32 | netword_id<<16 | service_id
  • libs/libmythtv/eitfixup.h

     
    4545        kFixPremiere   = 0x0400,
    4646        kFixHDTV       = 0x0800,
    4747        kFixNL         = 0x1000,
     48        kFixNO         = 0x10000,
    4849
    4950        // Early fixups
    5051        kEFixForceISO8859_1  = 0x2000,
     
    8182    void FixFI(DBEventEIT &event) const;            // Finland DVB-T
    8283    void FixPremiere(DBEventEIT &event) const;      // german pay-tv Premiere
    8384    void FixNL(DBEventEIT &event) const;            // Netherlands DVB-C
     85    void FixNO(DBEventEIT &event) const;            // Norwegian DVB-S
    8486
    8587    static QString AddDVBEITAuthority(uint chanid, const QString &id);
    8688
     
    170172    const QRegExp m_nlDirector;
    171173    const QRegExp m_nlCat;
    172174    const QRegExp m_nlOmroep;
     175    const QRegExp m_noRerun;
    173176};
    174177
    175178#endif // EITFIXUP_H