Skip to content

Commit

Permalink
Remove (HD) and [HD] from subtitle and description in Norwegian EIT
Browse files Browse the repository at this point in the history
Fixes #10799
  • Loading branch information
stuarta authored and jyavenard committed Mar 8, 2013
1 parent 3b98a7f commit 72946d9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mythtv/libs/libmythtv/eitfixup.cpp
Expand Up @@ -116,6 +116,7 @@ EITFixUp::EITFixUp()
m_nlCat("^(Amusement|Muziek|Informatief|Nieuws/actualiteiten|Jeugd|Animatie|Sport|Serie/soap|Kunst/Cultuur|Documentaire|Film|Natuur|Erotiek|Comedy|Misdaad|Religieus)\\.\\s"),
m_nlOmroep ("\\s\\(([A-Z]+/?)+\\)$"),
m_noRerun("\\(R\\)"),
m_noHD("[\\(\\[]HD[\\)\\]]"),
m_noColonSubtitle("^([^:]+): (.+)"),
m_noNRKCategories("^(Superstrek[ea]r|Supersomm[ea]r|Superjul|Barne-tv|Fantorangen|Kuraffen|Supermorg[eo]n|Julemorg[eo]n|Sommermorg[eo]n|"
"Kuraffen-TV|Sport i dag|NRKs sportsl.rdag|NRKs sportss.ndag|Dagens dokumentar|"
Expand Down Expand Up @@ -1737,6 +1738,20 @@ void EITFixUp::FixNO(DBEventEIT &event) const
event.previouslyshown = true;
event.title = event.title.replace(m_noRerun, "");
}
// Check for "subtitle (HD)" in the subtitle
position = event.subtitle.indexOf(m_noHD);
if (position != -1)
{
event.videoProps |= VID_HDTV;
event.subtitle = event.subtitle.replace(m_noHD, "");
}
// Check for "description (HD)" in the description
position = event.description.indexOf(m_noHD);
if (position != -1)
{
event.videoProps |= VID_HDTV;
event.description = event.description.replace(m_noHD, "");
}
}

/** \fn EITFixUp::FixNRK_DVBT(DBEventEIT&) const
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythtv/eitfixup.h
Expand Up @@ -193,6 +193,7 @@ class EITFixUp
const QRegExp m_nlCat;
const QRegExp m_nlOmroep;
const QRegExp m_noRerun;
const QRegExp m_noHD;
const QRegExp m_noColonSubtitle;
const QRegExp m_noNRKCategories;
const QRegExp m_noPremiere;
Expand Down

0 comments on commit 72946d9

Please sign in to comment.