MythTV  master
Macros | Functions | Variables
recordingextender.cpp File Reference
#include "mythchrono.h"
#include "mythcorecontext.h"
#include "mythdate.h"
#include "mythdb.h"
#include "mythdownloadmanager.h"
#include "mythevent.h"
#include "mythlogging.h"
#include "recordingextender.h"
#include "scheduler.h"
Include dependency graph for recordingextender.cpp:

Go to the source code of this file.

Macros

#define LOC   QString("RecExt: ")
 

Functions

static bool ValidRecordingStatus (RecStatus::Type recstatus)
 Does this recording status indicate that the recording is still ongoing. More...
 
static QString normalizeString (const QString &s)
 Remove all diacritical marks, etc., etc., from a string leaving just the base characters. More...
 
static bool parseProgramString (const QString &string, int limit, QString &team1, QString &team2)
 

Variables

static constexpr std::chrono::minutes extensionTime {10}
 
static constexpr int extensionTimeInSec
 
static const QRegularExpression versusPattern {R"(\s(at|@|vs\.?)\s)"}
 
static const QRegularExpression sentencePattern {R"(:|\.+\s)"}
 
static const QString espnInfoUrlFmt {"http://site.api.espn.com/apis/site/v2/sports/%1/%2/scoreboard"}
 ESPN ///. More...
 
static const QString espnGameUrlFmt {"http://sports.core.api.espn.com/v2/sports/%1/leagues/%2/events/%3/competitions/%3/status"}
 

Macro Definition Documentation

◆ LOC

#define LOC   QString("RecExt: ")

Definition at line 34 of file recordingextender.cpp.

Function Documentation

◆ ValidRecordingStatus()

static bool ValidRecordingStatus ( RecStatus::Type  recstatus)
inlinestatic

Does this recording status indicate that the recording is still ongoing.

Parameters
[in]recstatusThe status of a single program recording.
Returns
true if the program is still being recorded. Returns false if the recording has failed, stopped, etc.

Definition at line 47 of file recordingextender.cpp.

Referenced by RecordingExtender::processActiveRecordings(), and RecordingExtender::processNewRecordings().

◆ normalizeString()

static QString normalizeString ( const QString &  s)
static

Remove all diacritical marks, etc., etc., from a string leaving just the base characters.

This is needed for cases where TV listing use diacritical marks in the sports team names, but the information provider doesn't.

Parameters
sThe string to clean up.
Returns
The cleaned up string.

Definition at line 337 of file recordingextender.cpp.

Referenced by RecordingExtender::nameCleanup().

◆ parseProgramString()

static bool parseProgramString ( const QString &  string,
int  limit,
QString &  team1,
QString &  team2 
)
static

Definition at line 1191 of file recordingextender.cpp.

Referenced by RecordingExtender::parseProgramInfo().

Variable Documentation

◆ extensionTime

constexpr std::chrono::minutes extensionTime {10}
staticconstexpr

◆ extensionTimeInSec

constexpr int extensionTimeInSec
staticconstexpr
Initial value:
{
(duration_cast<std::chrono::seconds>(extensionTime).count()) }

Definition at line 37 of file recordingextender.cpp.

Referenced by RecordingExtender::extendRecording(), and RecordingExtender::processActiveRecordings().

◆ versusPattern

const QRegularExpression versusPattern {R"(\s(at|@|vs\.?)\s)"}
static

Definition at line 39 of file recordingextender.cpp.

Referenced by RecExtEspnDataPage::findGameInfo(), and parseProgramString().

◆ sentencePattern

const QRegularExpression sentencePattern {R"(:|\.+\s)"}
static

Definition at line 40 of file recordingextender.cpp.

Referenced by parseProgramString().

◆ espnInfoUrlFmt

const QString espnInfoUrlFmt {"http://site.api.espn.com/apis/site/v2/sports/%1/%2/scoreboard"}
static

ESPN ///.

Definition at line 376 of file recordingextender.cpp.

Referenced by RecExtEspnDataSource::makeInfoUrl().

◆ espnGameUrlFmt

const QString espnGameUrlFmt {"http://sports.core.api.espn.com/v2/sports/%1/leagues/%2/events/%3/competitions/%3/status"}
static

Definition at line 377 of file recordingextender.cpp.

Referenced by RecExtEspnDataSource::makeGameUrl().

extensionTime
static constexpr std::chrono::minutes extensionTime
Definition: recordingextender.cpp:36