MythTV  master
Variables
eitfixup.cpp File Reference
#include <algorithm>
#include <array>
#include "eitfixup.h"
#include "programinfo.h"
#include "channelutil.h"
#include "dishdescriptors.h"
#include "mythlogging.h"
Include dependency graph for eitfixup.cpp:

Go to the source code of this file.

Variables

const QString seasonStr = R"(\b(?:Season|Series|S)\s*(\d+)\s*,?)"
 
const QString longEp = R"(\b(?:Ep|Episode)\s*(\d+)\s*(?:(?:/|of)\s*(\d*))?)"
 
const QString longSeasEp = QString("\\‍(?(?:%1)?\\s*%2").arg(seasonStr, longEp)
 
const QString longContext = QString(R"(\‍(*%1\s*\‍)?\s*\.?)").arg(longSeasEp)
 
const QString shortEp = R"((\d+)\s*(?:/|of)\s*(\d+))"
 
const QString shortContext
 
static const QRegularExpression kAtvSubtitle { R"(,{0,1}\sFolge\s(\d{1,3})$)" }
 
static const QRegularExpression kDeDisneyChannelSubtitle { R"(,([^,]+?)\s{0,1}(\d{4})$)" }
 
static const QRegularExpression kDePremiereAirdate { R"(\s?([^\s^\.]+)\s((?:1|2)[0-9]{3})\.)" }
 
static const QRegularExpression kDePremiereCredits { R"(\sVon\s([^,]+)(?:,|\su\.\sa\.)\smit\s([^\.]*)\.)" }
 
static const QRegularExpression kDePremiereLength { R"(\s?[0-9]+\sMin\.)" }
 
static const QRegularExpression kDePremiereOTitle { R"(\s*\‍(([^\‍)]*)\‍)$)" }
 
static const QRegularExpression kDeSkyDescriptionSeasonEpisode { R"(^(\d{1,2}).\sStaffel,\sFolge\s(\d{1,2}):\s)" }
 
static const QRegularExpression kHtml { "</?EM>", QRegularExpression::CaseInsensitiveOption }
 
static const QRegularExpression kPro7Cast
 
static const QRegularExpression kPro7CastOne { R"(^([^\‍(]*?)\‍((.*)\‍)$)" }
 
static const QRegularExpression kPro7Crew
 
static const QRegularExpression kPro7CrewOne { R"(^(.*?):\s+(.*)$)" }
 
static const QRegularExpression kPro7Subtitle { R"(,{0,1}([^,]*?),([^,]+?)\s{0,1}(\d{4})$)" }
 
static const QRegularExpression kStereo { R"(\b\(?[sS]tereo\)?\b)" }
 
static const QRegularExpression kUK24ep { R"(^\d{1,2}:00[ap]m to \d{1,2}:00[ap]m: )" }
 
static const QRegularExpression kUKAllNew { R"(All New To 4Music!\s?)" }
 
static const QRegularExpression kUKAlsoInHD
 
static const QRegularExpression kUKBBC34
 
static const QRegularExpression kUKBBC7rpt { R"(\[Rptd?[^]]+?\d{1,2}\.\d{1,2}[ap]m\]\.)" }
 
static const QRegularExpression kUKCC { R"(\[(?:(AD|SL|S|W|HD),?)+\])" }
 
static const QRegularExpression kUKCEPQ { R"([:\!\.\?]\s)" }
 
static const QRegularExpression kUKColonPeriod { R"([:\.])" }
 
static const QRegularExpression kUKCompleteDots { R"(^\.\.+$)" }
 
static const QRegularExpression kUKDescriptionRemove { R"(^(?:CBBC\s*?\.|CBeebies\s*?\.|Class TV\s*?:|BBC Switch\.))" }
 
static const QRegularExpression kUKDotEnd { R"(\.$)" }
 
static const QRegularExpression kUKDotSpaceStart { R"(^\. )" }
 
static const QRegularExpression kUKDoubleDotEnd { R"(\.\.+$)" }
 
static const QRegularExpression kUKDoubleDotStart { R"(^\.\.+)" }
 
static const QRegularExpression kUKExclusionFromSubtitle
 
static const QRegularExpression kUKLaONoSplit { "^Law & Order: (?:Criminal Intent|LA|Special Victims Unit|Trial by Jury|UK|You the Jury)" }
 
static const QRegularExpression kUKNew
 
static const QRegularExpression kUKNewTitle
 
static const QRegularExpression kUKPart
 
static const QRegularExpression kUKQuotedSubtitle { R"((?:^')([\w\s\-,]+?)(?:\.' ))" }
 
static const QRegularExpression kUKSeries
 
static const QRegularExpression kUKSpaceColonStart { R"(^[ |:]*)" }
 
static const QRegularExpression kUKSpaceStart { "^ " }
 
static const QRegularExpression kUKStarring { R"((?:Western\s)?[Ss]tarring ([\w\s\-']+?)[Aa]nd\s([\w\s\-']+?)[\.|,](?:\s)*(\d{4})?(?:\.\s)?)" }
 
static const QRegularExpression kUKThen
 
static const QRegularExpression kUKTime { R"(\d{1,2}[\.:]\d{1,2}\s*(am|pm|))" }
 
static const QRegularExpression kUKTitleRemove { "^(?:[tT]4:|Schools\\s*?:)" }
 
static const QRegularExpression kUKYear { R"([\[\‍(]([\d]{4})[\‍)\]])" }
 
static const QRegularExpression kUKYearColon { R"(^[\d]{4}:)" }
 
static const QRegularExpression kUnitymediaImdbrating { R"(\s*IMDb Rating: (\d\.\d)\s?/10$)" }
 

Variable Documentation

◆ seasonStr

const QString seasonStr = R"(\b(?:Season|Series|S)\s*(\d+)\s*,?)"

Definition at line 22 of file eitfixup.cpp.

◆ longEp

const QString longEp = R"(\b(?:Ep|Episode)\s*(\d+)\s*(?:(?:/|of)\s*(\d*))?)"

Definition at line 26 of file eitfixup.cpp.

◆ longSeasEp

const QString longSeasEp = QString("\\‍(?(?:%1)?\\s*%2").arg(seasonStr, longEp)

Definition at line 30 of file eitfixup.cpp.

◆ longContext

const QString longContext = QString(R"(\‍(*%1\s*\‍)?\s*\.?)").arg(longSeasEp)

Definition at line 34 of file eitfixup.cpp.

◆ shortEp

const QString shortEp = R"((\d+)\s*(?:/|of)\s*(\d+))"

Definition at line 38 of file eitfixup.cpp.

◆ shortContext

const QString shortContext
Initial value:
=
QString(R"((?:^|\.)(\s*\‍(*\s*%1[\s)]*(?:[).:]|$)))").arg(shortEp)

Definition at line 45 of file eitfixup.cpp.

◆ kAtvSubtitle

const QRegularExpression kAtvSubtitle { R"(,{0,1}\sFolge\s(\d{1,3})$)" }
static

Definition at line 49 of file eitfixup.cpp.

◆ kDeDisneyChannelSubtitle

const QRegularExpression kDeDisneyChannelSubtitle { R"(,([^,]+?)\s{0,1}(\d{4})$)" }
static

Definition at line 50 of file eitfixup.cpp.

◆ kDePremiereAirdate

const QRegularExpression kDePremiereAirdate { R"(\s?([^\s^\.]+)\s((?:1|2)[0-9]{3})\.)" }
static

Definition at line 51 of file eitfixup.cpp.

◆ kDePremiereCredits

const QRegularExpression kDePremiereCredits { R"(\sVon\s([^,]+)(?:,|\su\.\sa\.)\smit\s([^\.]*)\.)" }
static

Definition at line 52 of file eitfixup.cpp.

◆ kDePremiereLength

const QRegularExpression kDePremiereLength { R"(\s?[0-9]+\sMin\.)" }
static

Definition at line 53 of file eitfixup.cpp.

◆ kDePremiereOTitle

const QRegularExpression kDePremiereOTitle { R"(\s*\‍(([^\‍)]*)\‍)$)" }
static

Definition at line 54 of file eitfixup.cpp.

◆ kDeSkyDescriptionSeasonEpisode

const QRegularExpression kDeSkyDescriptionSeasonEpisode { R"(^(\d{1,2}).\sStaffel,\sFolge\s(\d{1,2}):\s)" }
static

Definition at line 55 of file eitfixup.cpp.

◆ kHtml

const QRegularExpression kHtml { "</?EM>", QRegularExpression::CaseInsensitiveOption }
static

Definition at line 56 of file eitfixup.cpp.

◆ kPro7Cast

const QRegularExpression kPro7Cast
static
Initial value:
{ "\n\nDarsteller:\n(.*)$",
QRegularExpression::DotMatchesEverythingOption }

Definition at line 57 of file eitfixup.cpp.

◆ kPro7CastOne

const QRegularExpression kPro7CastOne { R"(^([^\‍(]*?)\‍((.*)\‍)$)" }
static

Definition at line 59 of file eitfixup.cpp.

◆ kPro7Crew

const QRegularExpression kPro7Crew
static
Initial value:
{ "\n\n(Regie:.*)$",
QRegularExpression::DotMatchesEverythingOption }

Definition at line 60 of file eitfixup.cpp.

◆ kPro7CrewOne

const QRegularExpression kPro7CrewOne { R"(^(.*?):\s+(.*)$)" }
static

Definition at line 62 of file eitfixup.cpp.

◆ kPro7Subtitle

const QRegularExpression kPro7Subtitle { R"(,{0,1}([^,]*?),([^,]+?)\s{0,1}(\d{4})$)" }
static

Definition at line 63 of file eitfixup.cpp.

◆ kStereo

const QRegularExpression kStereo { R"(\b\(?[sS]tereo\)?\b)" }
static

Definition at line 64 of file eitfixup.cpp.

◆ kUK24ep

const QRegularExpression kUK24ep { R"(^\d{1,2}:00[ap]m to \d{1,2}:00[ap]m: )" }
static

Definition at line 65 of file eitfixup.cpp.

◆ kUKAllNew

const QRegularExpression kUKAllNew { R"(All New To 4Music!\s?)" }
static

Definition at line 66 of file eitfixup.cpp.

◆ kUKAlsoInHD

const QRegularExpression kUKAlsoInHD
static
Initial value:
{ R"(\s*Also in HD\.)",
QRegularExpression::CaseInsensitiveOption }

Definition at line 67 of file eitfixup.cpp.

◆ kUKBBC34

const QRegularExpression kUKBBC34
static
Initial value:
{ R"(BBC (?:THREE|FOUR) on BBC (?:ONE|TWO)\.)",
QRegularExpression::CaseInsensitiveOption }

Definition at line 69 of file eitfixup.cpp.

◆ kUKBBC7rpt

const QRegularExpression kUKBBC7rpt { R"(\[Rptd?[^]]+?\d{1,2}\.\d{1,2}[ap]m\]\.)" }
static

Definition at line 71 of file eitfixup.cpp.

◆ kUKCC

const QRegularExpression kUKCC { R"(\[(?:(AD|SL|S|W|HD),?)+\])" }
static

Definition at line 72 of file eitfixup.cpp.

◆ kUKCEPQ

const QRegularExpression kUKCEPQ { R"([:\!\.\?]\s)" }
static

Definition at line 73 of file eitfixup.cpp.

◆ kUKColonPeriod

const QRegularExpression kUKColonPeriod { R"([:\.])" }
static

Definition at line 74 of file eitfixup.cpp.

◆ kUKCompleteDots

const QRegularExpression kUKCompleteDots { R"(^\.\.+$)" }
static

Definition at line 75 of file eitfixup.cpp.

◆ kUKDescriptionRemove

const QRegularExpression kUKDescriptionRemove { R"(^(?:CBBC\s*?\.|CBeebies\s*?\.|Class TV\s*?:|BBC Switch\.))" }
static

Definition at line 76 of file eitfixup.cpp.

◆ kUKDotEnd

const QRegularExpression kUKDotEnd { R"(\.$)" }
static

Definition at line 77 of file eitfixup.cpp.

◆ kUKDotSpaceStart

const QRegularExpression kUKDotSpaceStart { R"(^\. )" }
static

Definition at line 78 of file eitfixup.cpp.

◆ kUKDoubleDotEnd

const QRegularExpression kUKDoubleDotEnd { R"(\.\.+$)" }
static

Definition at line 79 of file eitfixup.cpp.

◆ kUKDoubleDotStart

const QRegularExpression kUKDoubleDotStart { R"(^\.\.+)" }
static

Definition at line 80 of file eitfixup.cpp.

◆ kUKExclusionFromSubtitle

const QRegularExpression kUKExclusionFromSubtitle
static
Initial value:
{ "(starring|stars\\s|drama|seres|sitcom)",
QRegularExpression::CaseInsensitiveOption }

Definition at line 81 of file eitfixup.cpp.

◆ kUKLaONoSplit

const QRegularExpression kUKLaONoSplit { "^Law & Order: (?:Criminal Intent|LA|Special Victims Unit|Trial by Jury|UK|You the Jury)" }
static

Definition at line 83 of file eitfixup.cpp.

◆ kUKNew

const QRegularExpression kUKNew
static
Initial value:
{ R"((New\.|\s*?(Brand New|New)\s*?(Series|Episode)\s*?[:\.\-]))",
QRegularExpression::CaseInsensitiveOption }

Definition at line 84 of file eitfixup.cpp.

◆ kUKNewTitle

const QRegularExpression kUKNewTitle
static
Initial value:
{ R"(^(Brand New|New:)\s*)",
QRegularExpression::CaseInsensitiveOption }

Definition at line 86 of file eitfixup.cpp.

◆ kUKPart

const QRegularExpression kUKPart
static
Initial value:
{ R"([-(\:,.]\s*(?:Part|Pt)\s*(\d+)\s*(?:(?:of|/)\s*(\d+))?\s*[-):,.])",
QRegularExpression::CaseInsensitiveOption }

Definition at line 88 of file eitfixup.cpp.

◆ kUKQuotedSubtitle

const QRegularExpression kUKQuotedSubtitle { R"((?:^')([\w\s\-,]+?)(?:\.' ))" }
static

Definition at line 90 of file eitfixup.cpp.

◆ kUKSeries

const QRegularExpression kUKSeries
static
Initial value:
{ "(?:" + longContext + "|" + shortContext + ")",
QRegularExpression::CaseInsensitiveOption }

Definition at line 94 of file eitfixup.cpp.

◆ kUKSpaceColonStart

const QRegularExpression kUKSpaceColonStart { R"(^[ |:]*)" }
static

Definition at line 96 of file eitfixup.cpp.

◆ kUKSpaceStart

const QRegularExpression kUKSpaceStart { "^ " }
static

Definition at line 97 of file eitfixup.cpp.

◆ kUKStarring

const QRegularExpression kUKStarring { R"((?:Western\s)?[Ss]tarring ([\w\s\-']+?)[Aa]nd\s([\w\s\-']+?)[\.|,](?:\s)*(\d{4})?(?:\.\s)?)" }
static

Definition at line 98 of file eitfixup.cpp.

◆ kUKThen

const QRegularExpression kUKThen
static
Initial value:
{ R"(\s*?(Then|Followed by) 60 Seconds\.)",
QRegularExpression::CaseInsensitiveOption }

Definition at line 99 of file eitfixup.cpp.

◆ kUKTime

const QRegularExpression kUKTime { R"(\d{1,2}[\.:]\d{1,2}\s*(am|pm|))" }
static

Definition at line 101 of file eitfixup.cpp.

◆ kUKTitleRemove

const QRegularExpression kUKTitleRemove { "^(?:[tT]4:|Schools\\s*?:)" }
static

Definition at line 102 of file eitfixup.cpp.

◆ kUKYear

const QRegularExpression kUKYear { R"([\[\‍(]([\d]{4})[\‍)\]])" }
static

Definition at line 103 of file eitfixup.cpp.

◆ kUKYearColon

const QRegularExpression kUKYearColon { R"(^[\d]{4}:)" }
static

Definition at line 104 of file eitfixup.cpp.

◆ kUnitymediaImdbrating

const QRegularExpression kUnitymediaImdbrating { R"(\s*IMDb Rating: (\d\.\d)\s?/10$)" }
static

Definition at line 105 of file eitfixup.cpp.

shortContext
const QString shortContext
Definition: eitfixup.cpp:45
longContext
const QString longContext
Definition: eitfixup.cpp:34
shortEp
const QString shortEp
Definition: eitfixup.cpp:38