MythTV
master
|
#include <recordingextender.h>
Public Member Functions | |
RecExtEspnDataSource (QObject *parent) | |
RecExtDataPage * | newPage (const QJsonDocument &doc) override |
QUrl | makeInfoUrl (const SportInfo &info, const QDateTime &dt) override |
Create a URL for the ESPN API that is built from the various known bits of data accumulated so far. More... | |
QUrl | makeGameUrl (const ActiveGame &game, const QString &str) override |
Create a URL for one specific game in the ESPN API that is built from the various known bits of data accumulated so far. More... | |
QUrl | findInfoUrl (ActiveGame &game, SportInfo &info) override |
Find the right URL for a specific recording. More... | |
RecExtDataPage * | loadPage (const ActiveGame &game, const QUrl &_url) override |
Download the data page for a game, and do some minimal validation. More... | |
![]() | |
RecordingExtender * | getExtender () |
Additional Inherited Members | |
![]() | |
static void | clearCache () |
Clear the downloaded document cache. More... | |
![]() | |
RecExtDataSource (QObject *parent) | |
![]() | |
QUrl | m_url |
![]() | |
static QHash< QString, QJsonDocument > | s_downloadedJson {} |
A cache of downloaded documents. More... | |
Definition at line 280 of file recordingextender.h.
|
inlineexplicit |
Definition at line 283 of file recordingextender.h.
|
inlineoverridevirtual |
Implements RecExtDataSource.
Definition at line 284 of file recordingextender.h.
Referenced by loadPage().
|
overridevirtual |
Create a URL for the ESPN API that is built from the various known bits of data accumulated so far.
[in] | info | A data structure describing the sport/league. |
[in] | dt | The date for which sporting events should be retrieved. |
Implements RecExtDataSource.
Definition at line 629 of file recordingextender.cpp.
Referenced by findInfoUrl().
|
overridevirtual |
Create a URL for one specific game in the ESPN API that is built from the various known bits of data accumulated so far.
[in] | game | A data structure describing the specific game of interest. |
[in] | str | The game id for this specific game. |
Implements RecExtDataSource.
Definition at line 649 of file recordingextender.cpp.
|
overridevirtual |
Find the right URL for a specific recording.
The data pages are grouped by the day they start (in local time), but the retrieval service assumes that URLs are specified with UTC. For example, retrieving ".../scoreboard" at 19:59 EDT (23:59Z) returns the games for that day, but at 20:00 EDT (00:00Z) it retrieves the games for the next day. The form ".../scoreboard?dates=yyyMMdd" has to be used to select the correct data page. This can mean that two games being simultaneously recorded use different URLS if one started before 00:00Z and the other started after.
[in] | game | A description of the desired game. The team names and the URL must be valid on input. |
[in,out] | info | A structure describing this data endpoint. |
Implements RecExtDataSource.
Definition at line 670 of file recordingextender.cpp.
|
overridevirtual |
Download the data page for a game, and do some minimal validation.
Cache the result so that subsequent lookups don't cause repeated downloads of the same page. (The cache must be cleared periodically.)
[in] | game | A description of the desired game. The team names and the URL must be valid on input. |
Implements RecExtDataSource.
Definition at line 565 of file recordingextender.cpp.
Referenced by findInfoUrl().