Go to the documentation of this file.
29 #include "libmythbase/mythconfig.h"
31 #include <QScriptEngine>
42 Q_INVOKABLE
explicit Dvr( QObject * =
nullptr ) {}
52 const QString &TitleRegEx,
53 const QString &RecGroup,
55 const QString &Category,
58 bool IgnoreDeleted)
override;
63 const QDateTime &StartTime,
64 const QDateTime &EndTime,
66 const QString &SeriesId,
68 const QString &Sort)
override;
72 const QDateTime &recstarttsRaw )
override;
75 const QJsonObject & json)
override;
81 const QDateTime &recstarttsRaw,
83 bool AllowRerecord )
override;
87 const QDateTime &recstarttsRaw,
89 bool AllowRerecord )
override;
93 const QDateTime &recstarttsRaw )
override;
99 const QDateTime &recstarttsRaw )
override;
107 const QDateTime &recstarttsRaw,
108 bool Watched)
override;
112 const QDateTime &recstarttsRaw,
113 const QString &OffsetType )
override;
117 const QDateTime &recstarttsRaw,
118 const QString &OffsetType,
124 const QDateTime &recstarttsRaw,
125 const QString &OffsetType )
override;
129 const QDateTime &recstarttsRaw,
130 const QString &OffsetType )
override;
133 const QString &OffsetType )
override;
138 const QJsonObject & json )
override;
142 int RecordId )
override;
164 QStringList
GetTitleList (
const QString &RecGroup )
override;
171 const QString& Subtitle,
172 const QString& Description,
173 const QString& Category,
174 const QDateTime& recstarttsRaw,
175 const QDateTime& recendtsRaw,
176 const QString& SeriesId,
177 const QString& ProgramId,
179 const QString& Station,
186 const QString& Inetref,
193 const QDateTime& lastrectsRaw,
212 int Transcoder)
override;
215 const QString& Title,
216 const QString& Subtitle,
217 const QString& Description,
218 const QString& Category,
219 const QDateTime& dStartTimeRaw,
220 const QDateTime& dEndTimeRaw,
221 const QString& SeriesId,
222 const QString& ProgramId,
224 const QString& Station,
230 const QString& Inetref,
255 int Transcoder)
override;
260 const QDateTime &StartTime,
261 bool NeverRecord )
override;
266 bool Descending )
override;
269 const QString& Template,
272 const QDateTime& dStartTimeRaw,
273 bool MakeOverride )
override;
280 const QDateTime &recstarttsRaw )
override;
288 const QDateTime &StartTime )
override;
303 const QString &JobName,
306 QDateTime jobstarttsRaw,
308 QString JobArgs )
override;
330 class ScriptableDvr :
public QObject
337 QScriptEngine *m_pEngine;
341 Q_INVOKABLE
explicit ScriptableDvr( QScriptEngine *pEngine, QObject *parent =
nullptr ) : QObject( parent )
348 QObject* GetExpiringList (
int StartIndex,
356 QObject* GetRecordedList (
bool Descending,
359 const QString &TitleRegEx,
360 const QString &RecGroup,
362 const QString &Category,
370 TitleRegEx, RecGroup,
372 IgnoreLiveTV, IgnoreDeleted);
376 QObject* GetOldRecordedList (
bool Descending,
379 const QDateTime &StartTime,
380 const QDateTime &EndTime,
381 const QString &Title,
382 const QString &SeriesId,
388 StartTime, EndTime, Title,
389 SeriesId, RecordId, Sort);
393 QObject* GetRecorded (
int RecordedId )
396 return m_obj.
GetRecorded( RecordedId, 0, QDateTime() );
400 bool RemoveRecorded (
int RecordedId,
406 ForceDelete, AllowRerecord );
410 bool DeleteRecording (
int RecordedId,
416 ForceDelete, AllowRerecord);
420 bool UnDeleteRecording (
int RecordedId )
427 QObject* GetConflictList (
int StartIndex,
436 QObject* GetUpcomingList (
int StartIndex,
448 QObject* GetEncoderList()
455 QObject* GetInputList()
462 QStringList GetRecGroupList()
469 QStringList GetRecStorageGroupList()
476 QStringList GetPlayGroupList()
483 QObject* GetRecRuleFilterList()
490 QStringList GetTitleList(
const QString &RecGroup )
497 QObject* GetTitleInfoList()
539 throw QString(
"Record ID cannot be <= zero");
542 static_cast<uint>(rule->
Id()),
568 bool RemoveRecordSchedule (
uint RecordId )
575 bool AddDontRecordSchedule(
int ChanId,
576 const QDateTime &StartTime,
584 QObject* GetRecordScheduleList(
int StartIndex,
594 QObject* GetRecordSchedule (
uint RecordId,
595 const QString &Template,
598 const QDateTime &StartTime,
603 ChanId, StartTime, MakeOverride);
607 bool EnableRecordSchedule (
uint RecordId )
614 bool DisableRecordSchedule(
uint RecordId )
621 QString RecStatusToString(
int RecStatus )
628 QString RecStatusToDescription(
int RecStatus,
630 const QDateTime &StartTime )
639 QString RecTypeToString(
const QString &RecType )
646 QString RecTypeToDescription(
const QString &RecType )
653 QString DupMethodToString(
const QString &DupMethod )
660 QString DupMethodToDescription(
const QString &DupMethod )
667 QString DupInToString(
const QString &DupIn )
674 QString DupInToDescription(
const QString &DupIn )
681 int ManageJobQueue(
const QString &
Action,
682 const QString &JobName,
685 QDateTime JobStartTime,
695 std::move(JobStartTime),
696 std::move(RemoteHost),
697 std::move(JobArgs) );
QString DupMethodToDescription(const QString &DupMethod) override
bool SetRecordedMarkup(int RecordedId, const QJsonObject &json) override
DTC::RecRule * GetRecordSchedule(uint RecordId, const QString &Template, int nRecordedId, int ChanId, const QDateTime &dStartTimeRaw, bool MakeOverride) override
DTC::MarkupList * GetRecordedMarkup(int RecordedId) override
DTC::RecRuleFilterList * GetRecRuleFilterList() override
QString RecStatusToDescription(int RecStatus, int RecType, const QDateTime &StartTime) override
int AddRecordedProgram(const QJsonObject &json) override
QStringList GetProgramCategories(bool OnlyRecorded) override
bool AllowReRecord(int RecordedId) override
DTC::TitleInfoList * GetTitleInfoList() override
DTC::ProgramList * GetOldRecordedList(bool Descending, int StartIndex, int Count, const QDateTime &StartTime, const QDateTime &EndTime, const QString &Title, const QString &SeriesId, int RecordId, const QString &Sort) override
Used to expire recordings to make space for new recordings.
DTC::InputList * GetInputList() override
DTC::CutList * GetRecordedSeek(int RecordedId, const QString &OffsetType) override
int RecordedIdForPathname(const QString &pathname) override
QString RecTypeToString(const QString &RecType) override
DTC::ProgramList * GetExpiringList(int StartIndex, int Count) override
QString DupMethodToString(const QString &DupMethod) override
DTC::RecRuleList * GetRecordScheduleList(int StartIndex, int Count, const QString &Sort, bool Descending) override
An action (for this plugin) consists of a description, and a set of key sequences.
QString RecStatusToString(int RecStatus) override
bool StopRecording(int RecordedId) override
DTC::CutList * GetRecordedCutList(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, const QString &OffsetType) override
DTC::EncoderList * GetEncoderList() override
bool RescheduleRecordings(void) override
DTC::Program * GetRecorded(int RecordedId, int ChanId, const QDateTime &recstarttsRaw) override
bool UnDeleteRecording(int RecordedId, int ChanId, const QDateTime &recstarttsRaw) override
#define Q_SCRIPT_DECLARE_QMETAOBJECT_MYTHTV(T, _Arg1)
bool RemoveRecorded(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, bool ForceDelete, bool AllowRerecord) override
bool UpdateRecordSchedule(uint RecordId, const QString &Title, const QString &Subtitle, const QString &Description, const QString &Category, const QDateTime &dStartTimeRaw, const QDateTime &dEndTimeRaw, const QString &SeriesId, const QString &ProgramId, int ChanId, const QString &Station, int FindDay, QTime FindTime, bool Inactive, uint Season, uint Episode, const QString &Inetref, QString Type, QString SearchType, int RecPriority, uint PreferredInput, int StartOffset, int EndOffset, QString DupMethod, QString DupIn, bool NewEpisOnly, uint Filter, QString RecProfile, QString RecGroup, QString StorageGroup, QString PlayGroup, bool AutoExpire, int MaxEpisodes, bool MaxNewest, bool AutoCommflag, bool AutoTranscode, bool AutoMetaLookup, bool AutoUserJob1, bool AutoUserJob2, bool AutoUserJob3, bool AutoUserJob4, int Transcoder) override
Q_INVOKABLE Dvr(QObject *=nullptr)
bool UpdateRecordedWatchedStatus(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, bool Watched) override
QStringList GetPlayGroupList() override
bool AddRecordedCredits(int RecordedId, const QJsonObject &json) override
bool DeleteRecording(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, bool ForceDelete, bool AllowRerecord) override
#define SCRIPT_CATCH_EXCEPTION(default, code)
int RecordedIdForKey(int ChanId, const QDateTime &recstarttsRaw) override
QStringList GetRecStorageGroupList() override
bool AddDontRecordSchedule(int ChanId, const QDateTime &StartTime, bool NeverRecord) override
DTC::ProgramList * GetUpcomingList(int StartIndex, int Count, bool ShowAll, int RecordId, int RecStatus) override
QString RecTypeToDescription(const QString &RecType) override
bool DisableRecordSchedule(uint RecordId) override
uint AddRecordSchedule(const QString &Title, const QString &Subtitle, const QString &Description, const QString &Category, const QDateTime &recstarttsRaw, const QDateTime &recendtsRaw, const QString &SeriesId, const QString &ProgramId, int ChanId, const QString &Station, int FindDay, QTime FindTime, int ParentId, bool Inactive, uint Season, uint Episode, const QString &Inetref, QString Type, QString SearchType, int RecPriority, uint PreferredInput, int StartOffset, int EndOffset, const QDateTime &lastrectsRaw, QString DupMethod, QString DupIn, bool NewEpisOnly, uint Filter, QString RecProfile, QString RecGroup, QString StorageGroup, QString PlayGroup, bool AutoExpire, int MaxEpisodes, bool MaxNewest, bool AutoCommflag, bool AutoTranscode, bool AutoMetaLookup, bool AutoUserJob1, bool AutoUserJob2, bool AutoUserJob3, bool AutoUserJob4, int Transcoder) override
bool ReactivateRecording(int RecordedId, int ChanId, const QDateTime &recstarttsRaw) override
bool RemoveRecordSchedule(uint RecordId) override
QStringList GetTitleList(const QString &RecGroup) override
QStringList GetRecGroupList() override
bool SetSavedBookmark(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, const QString &OffsetType, long Offset) override
QString DupInToDescription(const QString &DupIn) override
QString DupInToString(const QString &DupIn) override
int ManageJobQueue(const QString &Action, const QString &JobName, int JobId, int RecordedId, QDateTime jobstarttsRaw, QString RemoteHost, QString JobArgs) override
DTC::ProgramList * GetConflictList(int StartIndex, int Count, int RecordId) override
DTC::CutList * GetRecordedCommBreak(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, const QString &OffsetType) override
bool EnableRecordSchedule(uint RecordId) override
DTC::ProgramList * GetRecordedList(bool Descending, int StartIndex, int Count, const QString &TitleRegEx, const QString &RecGroup, const QString &StorageGroup, const QString &Category, const QString &Sort, bool IgnoreLiveTV, bool IgnoreDeleted) override
long GetSavedBookmark(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, const QString &OffsetType) override