| 1 | diff --git a/mythtv/libs/libmythtv/eitfixup.cpp b/mythtv/libs/libmythtv/eitfixup.cpp
|
|---|
| 2 | index 5d7a668a00..f88d728cb1 100644
|
|---|
| 3 | --- a/mythtv/libs/libmythtv/eitfixup.cpp
|
|---|
| 4 | +++ b/mythtv/libs/libmythtv/eitfixup.cpp
|
|---|
| 5 | @@ -198,6 +198,7 @@ EITFixUp::EITFixUp()
|
|---|
| 6 | m_auFreeviewYC(R"((.*) \(([12][0-9][0-9][0-9])\) \((.+)\)$)"),
|
|---|
| 7 | m_auFreeviewSYC(R"((.*) \((.+)\) \(([12][0-9][0-9][0-9])\) \((.+)\)$)"),
|
|---|
| 8 | m_html("</?EM>", Qt::CaseInsensitive),
|
|---|
| 9 | + m_grRating("(?:(\\[[KÎ](?:(|8|12|16|18)\\]\\s*)))", Qt::CaseInsensitive),
|
|---|
| 10 | m_grReplay("\\([ÎE]\\)"),
|
|---|
| 11 | m_grDescriptionFinale("\\s*΀ελεÏ
|
|---|
| 12 | Ïαίο\\sÎÏειÏÏΎιο\\.\\s*"),
|
|---|
| 13 | m_grActors("(?:[Î Ï]α[ιί]ζοÏ
|
|---|
| 14 | Μ:|[ÎMÎŒ]ε ÏοÏ
|
|---|
| 15 | Ï:|Î ÏÏÏαγÏΜιÏÏο[Ï
|
|---|
| 16 | Ï]Μ:|Î ÏÏÏαγÏΜιÏÏε[ιί]:?)(?:\\s+ÏÏο ÏÏλο(?: ÏοÏ
|
|---|
| 17 | | ÏηÏ)?\\s(?:\\w+\\s[οη]\\s))?([-\\w\\s']+(?:,[-\\w\\s']+)*)(?:κ\\.[αά])?(?:\\W?)"),
|
|---|
| 18 | @@ -211,7 +212,7 @@ EITFixUp::EITFixUp()
|
|---|
| 19 | m_grCountry("(?:\\W|\\b)(?:(ελληΜ|ÏοÏ
|
|---|
| 20 | Ïκ|αΌεÏικ[αά]Μ|γαλλ|αγγλ|βÏεÏÏ?αΜ|γεÏΌαΜ|ÏÏÏÏ?|ιÏαλ|ελβεÏ|ÏοÏ
|
|---|
| 21 | ηΎ|ιÏÏαΜ|ÏοÏÏογαλ|ΌεΟικ[αά]Μ|κιΜ[εÎ]ζικ|ιαÏÏΜ|καΜαΎ|βÏαζιλι[αά]Μ)(ικ[ηή][ÏÏ]))",Qt::CaseInsensitive),
|
|---|
| 22 | m_grlongEp("\\b(?:ÎÏ.|εÏειÏ[οÏ]Ύιο:?)\\s*(\\d+)(?:\\W?)",Qt::CaseInsensitive),
|
|---|
| 23 | m_grSeasonAsRomanNumerals(",\\s*([MDCLXVIÎΧ]+)$",Qt::CaseInsensitive),
|
|---|
| 24 | - m_grSeason("(?:\\W-?)*(?:\\(-\\s*)?\\b(([Î-Ω]{1,2})(?:'|Î)?|(\\d{1,2})(?:οÏ|οÏ
|
|---|
| 25 | |oÏ|os)?)(?:\\s*κ[Ï
|
|---|
| 26 | Ï]κλο(?:[ÏÏ]|Ï
|
|---|
| 27 | )){1}\\s?",Qt::CaseInsensitive),
|
|---|
| 28 | + m_grSeason("(?:\\W-?)*(?:\\(-\\s*)?\\b(([Î-Ω|A|B|E|Z|H|I|K|M|N]{1,2})(?:'|Î)?|(\\d{1,2})(?:οÏ|οÏ
|
|---|
| 29 | |oÏ|os)?)(?:\\s*[ÎκKk][Ï
|
|---|
| 30 | Ï]κλο(?:[ÏÏ]|Ï
|
|---|
| 31 | )){1}\\s?",Qt::CaseInsensitive),
|
|---|
| 32 | m_grRealTitleinDescription(R"((?:^\()([A-Za-z\s\d-]+)(?:\))(?:\s*))"),
|
|---|
| 33 | // cap1 = real title
|
|---|
| 34 | // cap0 = real title in parentheses.
|
|---|
| 35 | @@ -2601,9 +2602,23 @@ void EITFixUp::FixGreekSubtitle(DBEventEIT &event)
|
|---|
| 36 |
|
|---|
| 37 | void EITFixUp::FixGreekEIT(DBEventEIT &event) const
|
|---|
| 38 | {
|
|---|
| 39 | - //Live show
|
|---|
| 40 | +
|
|---|
| 41 | + int position;
|
|---|
| 42 | QRegExp tmpRegEx;
|
|---|
| 43 | - int position = event.m_title.indexOf("(Î)");
|
|---|
| 44 | +
|
|---|
| 45 | + // Program ratings
|
|---|
| 46 | + tmpRegEx = m_grRating;
|
|---|
| 47 | + position = event.m_title.indexOf(tmpRegEx);
|
|---|
| 48 | + if (position != -1)
|
|---|
| 49 | + {
|
|---|
| 50 | + EventRating prograting;
|
|---|
| 51 | + prograting.m_system="GR"; prograting.m_rating = tmpRegEx.cap(1);
|
|---|
| 52 | + event.m_ratings.push_back(prograting);
|
|---|
| 53 | + event.m_title = event.m_title.replace(tmpRegEx.cap(1), "").trimmed();
|
|---|
| 54 | + }
|
|---|
| 55 | +
|
|---|
| 56 | + //Live show
|
|---|
| 57 | + position = event.m_title.indexOf("(Î)");
|
|---|
| 58 | if (position != -1)
|
|---|
| 59 | {
|
|---|
| 60 | event.m_title = event.m_title.replace("(Î)", "");
|
|---|
| 61 | @@ -2773,8 +2788,49 @@ void EITFixUp::FixGreekEIT(DBEventEIT &event) const
|
|---|
| 62 | // cap(2) is the season for ÎÎÎÎ
|
|---|
| 63 | // cap(3) is the season for 1234
|
|---|
| 64 | int position1 = tmpSeries.indexIn(event.m_title);
|
|---|
| 65 | + if (position1 != -1)
|
|---|
| 66 | + {
|
|---|
| 67 | + if (!tmpSeries.cap(2).isEmpty()) // we found a letter representing a number
|
|---|
| 68 | + {
|
|---|
| 69 | + //sometimes Nat. TV writes numbers as letters, i.e Î=1, Î=2, Î=3, etc
|
|---|
| 70 | + //must convert them to numbers.
|
|---|
| 71 | + int tmpinteger = tmpSeries.cap(2).toUInt();
|
|---|
| 72 | + if (tmpinteger < 1)
|
|---|
| 73 | + {
|
|---|
| 74 | + if (tmpSeries.cap(2) == "Σ΀") // 6, don't ask!
|
|---|
| 75 | + event.m_season = 6;
|
|---|
| 76 | + else
|
|---|
| 77 | + {
|
|---|
| 78 | + QString LettToNumber = "0ÎÎÎÎÎ6ÎÎÎÎÎÎÎÎ";
|
|---|
| 79 | + tmpinteger = LettToNumber.indexOf(tmpSeries.cap(2));
|
|---|
| 80 | + if (tmpinteger != -1)
|
|---|
| 81 | + event.m_season = tmpinteger;
|
|---|
| 82 | + else
|
|---|
| 83 | + //sometimes they use english letters instead of greek. Compensating:
|
|---|
| 84 | + {
|
|---|
| 85 | + LettToNumber = "0ABÎÎE6ZHÎIKÎMN";
|
|---|
| 86 | + tmpinteger = LettToNumber.indexOf(tmpSeries.cap(2));
|
|---|
| 87 | + if (tmpinteger != -1)
|
|---|
| 88 | + event.m_season = tmpinteger;
|
|---|
| 89 | + }
|
|---|
| 90 | + }
|
|---|
| 91 | + }
|
|---|
| 92 | + }
|
|---|
| 93 | + else if (!tmpSeries.cap(3).isEmpty()) //number
|
|---|
| 94 | + {
|
|---|
| 95 | + event.m_season = tmpSeries.cap(3).toUInt();
|
|---|
| 96 | + }
|
|---|
| 97 | + series = true;
|
|---|
| 98 | + event.m_title.replace(tmpSeries.cap(0),"");
|
|---|
| 99 | + }
|
|---|
| 100 | +
|
|---|
| 101 | + // I have to search separately for season in title and description because it wouldn't work when in both.
|
|---|
| 102 | + series = false;
|
|---|
| 103 | + tmpSeries = m_grSeason;
|
|---|
| 104 | + // cap(2) is the season for ÎÎÎÎ
|
|---|
| 105 | + // cap(3) is the season for 1234
|
|---|
| 106 | int position2 = tmpSeries.indexIn(event.m_description);
|
|---|
| 107 | - if ((position1 != -1) || (position2 != -1))
|
|---|
| 108 | + if (position2 != -1)
|
|---|
| 109 | {
|
|---|
| 110 | if (!tmpSeries.cap(2).isEmpty()) // we found a letter representing a number
|
|---|
| 111 | {
|
|---|
| 112 | @@ -2799,11 +2855,10 @@ void EITFixUp::FixGreekEIT(DBEventEIT &event) const
|
|---|
| 113 | event.m_season = tmpSeries.cap(3).toUInt();
|
|---|
| 114 | }
|
|---|
| 115 | series = true;
|
|---|
| 116 | - if (position1 != -1)
|
|---|
| 117 | - event.m_title.replace(tmpSeries.cap(0),"");
|
|---|
| 118 | - if (position2 != -1)
|
|---|
| 119 | - event.m_description.replace(tmpSeries.cap(0),"");
|
|---|
| 120 | + event.m_description.replace(tmpSeries.cap(0),"");
|
|---|
| 121 | }
|
|---|
| 122 | +
|
|---|
| 123 | +
|
|---|
| 124 | // If Season is in Roman Numerals (I,II,etc)
|
|---|
| 125 | tmpSeries = m_grSeasonAsRomanNumerals;
|
|---|
| 126 | if ((position1 = tmpSeries.indexIn(event.m_title)) != -1
|
|---|
| 127 | @@ -2954,6 +3009,8 @@ void EITFixUp::FixGreekEIT(DBEventEIT &event) const
|
|---|
| 128 | {
|
|---|
| 129 | event.m_categoryType = ProgramInfo::kCategorySeries;
|
|---|
| 130 | }
|
|---|
| 131 | + // clear double commas.
|
|---|
| 132 | + event.m_description.replace(",,", ",");
|
|---|
| 133 | // just for luck, retrim fields.
|
|---|
| 134 | event.m_description = event.m_description.trimmed();
|
|---|
| 135 | event.m_title = event.m_title.trimmed();
|
|---|
| 136 | diff --git a/mythtv/libs/libmythtv/eitfixup.h b/mythtv/libs/libmythtv/eitfixup.h
|
|---|
| 137 | index 6dbc10784a..6cc7068172 100644
|
|---|
| 138 | --- a/mythtv/libs/libmythtv/eitfixup.h
|
|---|
| 139 | +++ b/mythtv/libs/libmythtv/eitfixup.h
|
|---|
| 140 | @@ -263,6 +263,7 @@ class MTV_PUBLIC EITFixUp
|
|---|
| 141 | const QRegExp m_auFreeviewYC;//year, cast
|
|---|
| 142 | const QRegExp m_auFreeviewSYC;//subtitle, year, cast
|
|---|
| 143 | const QRegExp m_html;
|
|---|
| 144 | + const QRegExp m_grRating; // Greek new parental rating system
|
|---|
| 145 | const QRegExp m_grReplay; //Greek rerun
|
|---|
| 146 | const QRegExp m_grDescriptionFinale; //Greek last m_grEpisode
|
|---|
| 147 | const QRegExp m_grActors; //Greek actors
|
|---|