MythTV  master
dvr.h
Go to the documentation of this file.
1 // Program Name: dvr.h
3 // Created : Mar. 7, 2011
4 //
5 // Copyright (c) 2011 David Blain <dblain@mythtv.org>
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 2 of the License, or
10 // (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 //
25 
26 #ifndef DVR_H
27 #define DVR_H
28 
29 #include <QScriptEngine>
30 
31 #include "services/dvrServices.h"
32 
33 class Dvr : public DvrServices
34 {
35  Q_OBJECT
36 
37  public:
38 
39  Q_INVOKABLE explicit Dvr( QObject */*parent*/ = nullptr ) {}
40 
41  public:
42 
43  DTC::ProgramList* GetExpiringList ( int StartIndex,
44  int Count ) override; // DvrServices
45 
46  DTC::ProgramList* GetRecordedList ( bool Descending,
47  int StartIndex,
48  int Count,
49  const QString &TitleRegEx,
50  const QString &RecGroup,
51  const QString &StorageGroup,
52  const QString &Category,
53  const QString &Sort) override; // DvrServices
54 
55  DTC::ProgramList* GetOldRecordedList ( bool Descending,
56  int StartIndex,
57  int Count,
58  const QDateTime &StartTime,
59  const QDateTime &EndTime,
60  const QString &Title,
61  const QString &SeriesId,
62  int RecordId,
63  const QString &Sort) override; // DvrServices
64 
65  DTC::Program* GetRecorded ( int RecordedId,
66  int ChanId,
67  const QDateTime &recstarttsRaw ) override; // DvrServices
68 
69  bool RemoveRecorded ( int RecordedId,
70  int ChanId,
71  const QDateTime &recstarttsRaw,
72  bool ForceDelete,
73  bool AllowRerecord ) override; // DvrServices
74 
75  bool DeleteRecording ( int RecordedId,
76  int ChanId,
77  const QDateTime &recstarttsRaw,
78  bool ForceDelete,
79  bool AllowRerecord ) override; // DvrServices
80 
81  bool UnDeleteRecording ( int RecordedId,
82  int ChanId,
83  const QDateTime &recstarttsRaw ) override; // DvrServices
84 
85  bool StopRecording ( int RecordedId ) override; // DvrServices
86 
87  bool ReactivateRecording ( int RecordedId,
88  int ChanId,
89  const QDateTime &recstarttsRaw ) override; // DvrServices
90 
91  bool RescheduleRecordings( void ) override; // DvrServices
92 
93  bool AllowReRecord ( int RecordedId ) override;
94 
95  bool UpdateRecordedWatchedStatus ( int RecordedId,
96  int ChanId,
97  const QDateTime &recstarttsRaw,
98  bool Watched) override; // DvrServices
99 
100  long GetSavedBookmark ( int RecordedId,
101  int ChanId,
102  const QDateTime &recstarttsRaw,
103  const QString &OffsetType ) override; // DvrServices
104 
105  bool SetSavedBookmark ( int RecordedId,
106  int ChanId,
107  const QDateTime &recstarttsRaw,
108  const QString &OffsetType,
109  long Offset
110  ) override; // DvrServices
111 
112  DTC::CutList* GetRecordedCutList ( int RecordedId,
113  int ChanId,
114  const QDateTime &recstarttsRaw,
115  const QString &OffsetType ) override; // DvrServices
116 
117  DTC::CutList* GetRecordedCommBreak ( int RecordedId,
118  int ChanId,
119  const QDateTime &recstarttsRaw,
120  const QString &OffsetType ) override; // DvrServices
121 
122  DTC::CutList* GetRecordedSeek ( int RecordedId,
123  const QString &OffsetType ) override; // DvrServices
124 
125  DTC::ProgramList* GetConflictList ( int StartIndex,
126  int Count,
127  int RecordId ) override; // DvrServices
128 
129  DTC::ProgramList* GetUpcomingList ( int StartIndex,
130  int Count,
131  bool ShowAll,
132  int RecordId,
133  int RecStatus ) override; // DvrServices
134 
135  DTC::EncoderList* GetEncoderList ( ) override; // DvrServices
136 
137  DTC::InputList* GetInputList ( ) override; // DvrServices
138 
139  QStringList GetRecGroupList ( ) override; // DvrServices
140 
141  QStringList GetProgramCategories ( bool OnlyRecorded ) override; // DvrServices
142 
143  QStringList GetRecStorageGroupList ( ) override; // DvrServices
144 
145  QStringList GetPlayGroupList ( ) override; // DvrServices
146 
147  DTC::RecRuleFilterList* GetRecRuleFilterList ( ) override; // DvrServices
148 
149  QStringList GetTitleList ( const QString &RecGroup ) override; // DvrServices
150 
151  DTC::TitleInfoList* GetTitleInfoList ( ) override; // DvrServices
152 
153  // Recording Rules
154 
155  uint AddRecordSchedule ( const QString& Title,
156  const QString& Subtitle,
157  const QString& Description,
158  const QString& Category,
159  QDateTime recstarttsRaw,
160  QDateTime recendtsRaw,
161  const QString& SeriesId,
162  const QString& ProgramId,
163  int ChanId,
164  const QString& Station,
165  int FindDay,
166  QTime FindTime,
167  int ParentId,
168  bool Inactive,
169  uint Season,
170  uint Episode,
171  const QString& Inetref,
172  QString Type,
173  QString SearchType,
174  int RecPriority,
175  uint PreferredInput,
176  int StartOffset,
177  int EndOffset,
178  QDateTime lastrectsRaw,
179  QString DupMethod,
180  QString DupIn,
181  uint Filter,
182  QString RecProfile,
183  QString RecGroup,
184  QString StorageGroup,
185  QString PlayGroup,
186  bool AutoExpire,
187  int MaxEpisodes,
188  bool MaxNewest,
189  bool AutoCommflag,
190  bool AutoTranscode,
191  bool AutoMetaLookup,
192  bool AutoUserJob1,
193  bool AutoUserJob2,
194  bool AutoUserJob3,
195  bool AutoUserJob4,
196  int Transcoder) override; // DvrServices
197 
198  bool UpdateRecordSchedule ( uint RecordId,
199  QString Title,
200  QString Subtitle,
201  QString Description,
202  QString Category,
203  QDateTime dStartTimeRaw,
204  QDateTime dEndTimeRaw,
205  QString SeriesId,
206  QString ProgramId,
207  int ChanId,
208  QString Station,
209  int FindDay,
210  QTime FindTime,
211  bool Inactive,
212  uint Season,
213  uint Episode,
214  const QString& Inetref,
215  QString Type,
216  QString SearchType,
217  int RecPriority,
218  uint PreferredInput,
219  int StartOffset,
220  int EndOffset,
221  QString DupMethod,
222  QString DupIn,
223  uint Filter,
224  QString RecProfile,
225  QString RecGroup,
226  QString StorageGroup,
227  QString PlayGroup,
228  bool AutoExpire,
229  int MaxEpisodes,
230  bool MaxNewest,
231  bool AutoCommflag,
232  bool AutoTranscode,
233  bool AutoMetaLookup,
234  bool AutoUserJob1,
235  bool AutoUserJob2,
236  bool AutoUserJob3,
237  bool AutoUserJob4,
238  int Transcoder) override; // DvrServices
239 
240  bool RemoveRecordSchedule ( uint RecordId ) override; // DvrServices
241 
242  bool AddDontRecordSchedule( int ChanId,
243  const QDateTime &StartTime,
244  bool NeverRecord ) override; // DvrServices
245 
246  DTC::RecRuleList* GetRecordScheduleList( int StartIndex,
247  int Count,
248  const QString &Sort,
249  bool Descending ) override; // DvrServices
250 
251  DTC::RecRule* GetRecordSchedule ( uint RecordId,
252  QString Template,
253  int nRecordedId,
254  int ChanId,
255  QDateTime dStartTimeRaw,
256  bool MakeOverride ) override; // DvrServices
257 
258  bool EnableRecordSchedule ( uint RecordId ) override; // DvrServices
259 
260  bool DisableRecordSchedule( uint RecordId ) override; // DvrServices
261 
262  int RecordedIdForKey( int ChanId,
263  const QDateTime &recstarttsRaw ) override; // DvrServices
264 
265  int RecordedIdForPathname( const QString &pathname ) override; // DvrServices
266 
267  QString RecStatusToString ( int RecStatus ) override; // DvrServices
268 
269  QString RecStatusToDescription ( int RecStatus,
270  int RecType,
271  const QDateTime &StartTime ) override; // DvrServices
272 
273  QString RecTypeToString ( QString RecType ) override; // DvrServices
274 
275  QString RecTypeToDescription ( QString RecType ) override; // DvrServices
276 
277  QString DupMethodToString ( QString DupMethod ) override; // DvrServices
278 
279  QString DupMethodToDescription ( QString DupMethod ) override; // DvrServices
280 
281  QString DupInToString ( QString DupIn ) override; // DvrServices
282 
283  QString DupInToDescription ( QString DupIn ) override; // DvrServices
284 
285  int ManageJobQueue ( const QString &Action,
286  const QString &JobName,
287  int JobId,
288  int RecordedId,
289  QDateTime jobstarttsRaw,
290  QString RemoteHost,
291  QString JobArgs ) override; // DvrServices
292 
293 };
294 
295 // --------------------------------------------------------------------------
296 // The following class wrapper is due to a limitation in Qt Script Engine. It
297 // requires all methods that return pointers to user classes that are derived from
298 // QObject actually return QObject* (not the user class *). If the user class pointer
299 // is returned, the script engine treats it as a QVariant and doesn't create a
300 // javascript prototype wrapper for it.
301 //
302 // This class allows us to keep the rich return types in the main API class while
303 // offering the script engine a class it can work with.
304 //
305 // Only API Classes that return custom classes needs to implement these wrappers.
306 //
307 // We should continue to look for a cleaning solution to this problem.
308 // --------------------------------------------------------------------------
309 
310 
311 class ScriptableDvr : public QObject
312 {
313  Q_OBJECT
314 
315  private:
316 
318  QScriptEngine *m_pEngine;
319 
320  public:
321 
322  Q_INVOKABLE explicit ScriptableDvr( QScriptEngine *pEngine, QObject *parent = nullptr ) : QObject( parent )
323  {
324  m_pEngine = pEngine;
325  }
326 
327  public slots:
328 
329  QObject* GetExpiringList ( int StartIndex,
330  int Count )
331  {
332  SCRIPT_CATCH_EXCEPTION( nullptr,
333  return m_obj.GetExpiringList( StartIndex, Count );
334  )
335  }
336 
337  QObject* GetRecordedList ( bool Descending,
338  int StartIndex,
339  int Count,
340  const QString &TitleRegEx,
341  const QString &RecGroup,
342  const QString &StorageGroup,
343  const QString &Category,
344  const QString &Sort
345  )
346  {
347  SCRIPT_CATCH_EXCEPTION( nullptr,
348  return m_obj.GetRecordedList( Descending, StartIndex, Count,
349  TitleRegEx, RecGroup,
350  StorageGroup, Category, Sort);
351  )
352  }
353 
354  QObject* GetOldRecordedList ( bool Descending,
355  int StartIndex,
356  int Count,
357  const QDateTime &StartTime,
358  const QDateTime &EndTime,
359  const QString &Title,
360  const QString &SeriesId,
361  int RecordId,
362  const QString &Sort)
363  {
364  SCRIPT_CATCH_EXCEPTION( nullptr,
365  return m_obj.GetOldRecordedList( Descending, StartIndex, Count,
366  StartTime, EndTime, Title,
367  SeriesId, RecordId, Sort);
368  )
369  }
370 
371  QObject* GetRecorded ( int RecordedId )
372  {
373  SCRIPT_CATCH_EXCEPTION( nullptr,
374  return m_obj.GetRecorded( RecordedId, 0, QDateTime() );
375  )
376  }
377 
378  bool RemoveRecorded ( int RecordedId,
379  bool ForceDelete,
380  bool AllowRerecord )
381  {
382  SCRIPT_CATCH_EXCEPTION( false,
383  return m_obj.RemoveRecorded( RecordedId, 0, QDateTime(),
384  ForceDelete, AllowRerecord );
385  )
386  }
387 
388  bool DeleteRecording ( int RecordedId,
389  bool ForceDelete,
390  bool AllowRerecord )
391  {
392  SCRIPT_CATCH_EXCEPTION( false,
393  return m_obj.DeleteRecording(RecordedId, 0, QDateTime(),
394  ForceDelete, AllowRerecord);
395  )
396  }
397 
398  bool UnDeleteRecording ( int RecordedId )
399  {
400  SCRIPT_CATCH_EXCEPTION( false,
401  return m_obj.UnDeleteRecording(RecordedId, 0, QDateTime());
402  )
403  }
404 
405  QObject* GetConflictList ( int StartIndex,
406  int Count,
407  int RecordId )
408  {
409  SCRIPT_CATCH_EXCEPTION( nullptr,
410  return m_obj.GetConflictList( StartIndex, Count, RecordId );
411  )
412  }
413 
414  QObject* GetUpcomingList ( int StartIndex,
415  int Count,
416  bool ShowAll,
417  int RecordId,
418  int RecStatus )
419  {
420  SCRIPT_CATCH_EXCEPTION( nullptr,
421  return m_obj.GetUpcomingList( StartIndex, Count, ShowAll,
422  RecordId, RecStatus );
423  )
424  }
425 
426  QObject* GetEncoderList()
427  {
428  SCRIPT_CATCH_EXCEPTION( nullptr,
429  return m_obj.GetEncoderList();
430  )
431  }
432 
433  QObject* GetInputList()
434  {
435  SCRIPT_CATCH_EXCEPTION( nullptr,
436  return m_obj.GetInputList();
437  )
438  }
439 
440  QStringList GetRecGroupList()
441  {
442  SCRIPT_CATCH_EXCEPTION( QStringList(),
443  return m_obj.GetRecGroupList();
444  )
445  }
446 
448  {
449  SCRIPT_CATCH_EXCEPTION( QStringList(),
450  return m_obj.GetRecStorageGroupList();
451  )
452  }
453 
454  QStringList GetPlayGroupList()
455  {
456  SCRIPT_CATCH_EXCEPTION( QStringList(),
457  return m_obj.GetPlayGroupList();
458  )
459  }
460 
462  {
463  SCRIPT_CATCH_EXCEPTION( nullptr,
464  return m_obj.GetRecRuleFilterList();
465  )
466  }
467 
468  QStringList GetTitleList( const QString &RecGroup )
469  {
470  SCRIPT_CATCH_EXCEPTION( QStringList(),
471  return m_obj.GetTitleList( RecGroup );
472  )
473  }
474 
475  QObject* GetTitleInfoList()
476  {
477  SCRIPT_CATCH_EXCEPTION( nullptr,
478  return m_obj.GetTitleInfoList();
479  )
480  }
481 
483  {
485  return m_obj.AddRecordSchedule(
486  rule->Title(), rule->SubTitle(),
487  rule->Description(), rule->Category(),
488  rule->StartTime(), rule->EndTime(),
489  rule->SeriesId(), rule->ProgramId(),
490  rule->ChanId(), rule->CallSign(),
491  rule->FindDay(), rule->FindTime(),
492  rule->ParentId(), rule->Inactive(),
493  rule->Season(), rule->Episode(),
494  rule->Inetref(), rule->Type(),
495  rule->SearchType(), rule->RecPriority(),
496  rule->PreferredInput(), rule->StartOffset(),
497  rule->EndOffset(), rule->LastRecorded(),
498  rule->DupMethod(),
499  rule->DupIn(), rule->Filter(),
500  rule->RecProfile(), rule->RecGroup(),
501  rule->StorageGroup(), rule->PlayGroup(),
502  rule->AutoExpire(), rule->MaxEpisodes(),
503  rule->MaxNewest(), rule->AutoCommflag(),
504  rule->AutoTranscode(), rule->AutoMetaLookup(),
505  rule->AutoUserJob1(), rule->AutoUserJob2(),
506  rule->AutoUserJob3(), rule->AutoUserJob4(),
507  rule->Transcoder());
508  )
509  }
510 
512  {
513  SCRIPT_CATCH_EXCEPTION( false,
514 
515  if (rule->Id() <= 0)
516  throw QString("Record ID cannot be <= zero");
517 
519  static_cast<uint>(rule->Id()),
520  rule->Title(), rule->SubTitle(),
521  rule->Description(), rule->Category(),
522  rule->StartTime(), rule->EndTime(),
523  rule->SeriesId(), rule->ProgramId(),
524  rule->ChanId(), rule->CallSign(),
525  rule->FindDay(), rule->FindTime(),
526  rule->Inactive(),
527  rule->Season(), rule->Episode(),
528  rule->Inetref(), rule->Type(),
529  rule->SearchType(), rule->RecPriority(),
530  rule->PreferredInput(), rule->StartOffset(),
531  rule->EndOffset(), rule->DupMethod(),
532  rule->DupIn(), rule->Filter(),
533  rule->RecProfile(), rule->RecGroup(),
534  rule->StorageGroup(), rule->PlayGroup(),
535  rule->AutoExpire(), rule->MaxEpisodes(),
536  rule->MaxNewest(), rule->AutoCommflag(),
537  rule->AutoTranscode(), rule->AutoMetaLookup(),
538  rule->AutoUserJob1(), rule->AutoUserJob2(),
539  rule->AutoUserJob3(), rule->AutoUserJob4(),
540  rule->Transcoder());
541  )
542  }
543 
544  bool RemoveRecordSchedule ( uint RecordId )
545  {
546  SCRIPT_CATCH_EXCEPTION( false,
547  return m_obj.RemoveRecordSchedule(RecordId);
548  )
549  }
550 
551  bool AddDontRecordSchedule( int ChanId,
552  const QDateTime &StartTime,
553  bool NeverRecord )
554  {
555  SCRIPT_CATCH_EXCEPTION( false,
556  return m_obj.AddDontRecordSchedule(ChanId, StartTime, NeverRecord);
557  )
558  }
559 
560  QObject* GetRecordScheduleList( int StartIndex,
561  int Count,
562  const QString &Sort,
563  bool Descending )
564  {
565  SCRIPT_CATCH_EXCEPTION( nullptr,
566  return m_obj.GetRecordScheduleList(StartIndex, Count, Sort, Descending);
567  )
568  }
569 
570  QObject* GetRecordSchedule ( uint RecordId,
571  QString Template,
572  int RecordedId,
573  int ChanId,
574  QDateTime StartTime,
575  bool MakeOverride )
576  {
577  SCRIPT_CATCH_EXCEPTION( nullptr,
578  return m_obj.GetRecordSchedule( RecordId, std::move(Template), RecordedId,
579  ChanId, std::move(StartTime), MakeOverride);
580  )
581  }
582 
583  bool EnableRecordSchedule ( uint RecordId )
584  {
585  SCRIPT_CATCH_EXCEPTION( false,
586  return m_obj.EnableRecordSchedule(RecordId);
587  )
588  }
589 
590  bool DisableRecordSchedule( uint RecordId )
591  {
592  SCRIPT_CATCH_EXCEPTION( false,
593  return m_obj.DisableRecordSchedule(RecordId);
594  )
595  }
596 
598  {
599  SCRIPT_CATCH_EXCEPTION( QString(),
601  )
602  }
603 
605  int RecType,
606  const QDateTime &StartTime )
607  {
608  SCRIPT_CATCH_EXCEPTION( QString(),
610  RecType,
611  StartTime );
612  )
613  }
614 
615  QString RecTypeToString( QString RecType )
616  {
617  SCRIPT_CATCH_EXCEPTION( QString(),
618  return m_obj.RecTypeToString( std::move(RecType) );
619  )
620  }
621 
622  QString RecTypeToDescription( QString RecType )
623  {
624  SCRIPT_CATCH_EXCEPTION( QString(),
625  return m_obj.RecTypeToDescription( std::move(RecType) );
626  )
627  }
628 
629  QString DupMethodToString( QString DupMethod )
630  {
631  SCRIPT_CATCH_EXCEPTION( QString(),
632  return m_obj.DupMethodToString( std::move(DupMethod) );
633  )
634  }
635 
636  QString DupMethodToDescription( QString DupMethod )
637  {
638  SCRIPT_CATCH_EXCEPTION( QString(),
639  return m_obj.DupMethodToDescription( std::move(DupMethod) );
640  )
641  }
642 
643  QString DupInToString( QString DupIn )
644  {
645  SCRIPT_CATCH_EXCEPTION( QString(),
646  return m_obj.DupInToString( std::move(DupIn) );
647  )
648  }
649 
650  QString DupInToDescription( QString DupIn )
651  {
652  SCRIPT_CATCH_EXCEPTION( QString(),
653  return m_obj.DupInToDescription( std::move(DupIn) );
654  )
655  }
656 
657  int ManageJobQueue( const QString &Action,
658  const QString &JobName,
659  int JobId,
660  int RecordedId,
661  QDateTime JobStartTime,
662  QString RemoteHost,
663  QString JobArgs )
664 
665  {
666  SCRIPT_CATCH_EXCEPTION( false,
667  return m_obj.ManageJobQueue( Action,
668  JobName,
669  JobId,
670  RecordedId,
671  std::move(JobStartTime),
672  std::move(RemoteHost),
673  std::move(JobArgs) );
674  )
675  }
676 
677 };
678 
679 // NOLINTNEXTLINE(modernize-use-auto)
681 
682 #endif
Dvr::GetRecordSchedule
DTC::RecRule * GetRecordSchedule(uint RecordId, QString Template, int nRecordedId, int ChanId, QDateTime dStartTimeRaw, bool MakeOverride) override
Definition: dvr.cpp:1500
ScriptableDvr::m_pEngine
QScriptEngine * m_pEngine
Definition: dvr.h:318
ScriptableDvr
Definition: dvr.h:312
Dvr
Definition: dvr.h:34
DTC::RecRule::AutoUserJob4
bool AutoUserJob4
Definition: recRule.h:66
ScriptableDvr::DupInToString
QString DupInToString(QString DupIn)
Definition: dvr.h:643
DTC::RecRule::CallSign
QString CallSign
Definition: recRule.h:38
Dvr::GetRecRuleFilterList
DTC::RecRuleFilterList * GetRecRuleFilterList() override
Definition: dvr.cpp:846
Dvr::RecStatusToDescription
QString RecStatusToDescription(int RecStatus, int RecType, const QDateTime &StartTime) override
Definition: dvr.cpp:1620
Dvr::RecTypeToDescription
QString RecTypeToDescription(QString RecType) override
Definition: dvr.cpp:1640
DTC::Program
Definition: programAndChannel.h:146
ScriptableDvr::m_obj
Dvr m_obj
Definition: dvr.h:317
Dvr::RecTypeToString
QString RecTypeToString(QString RecType) override
Definition: dvr.cpp:1630
Dvr::DupInToString
QString DupInToString(QString DupIn) override
Definition: dvr.cpp:1650
DTC::RecRule::SeriesId
QString SeriesId
Definition: recRule.h:33
ScriptableDvr::GetRecGroupList
QStringList GetRecGroupList()
Definition: dvr.h:440
DTC::RecRule::RecGroup
QString RecGroup
Definition: recRule.h:52
Dvr::GetProgramCategories
QStringList GetProgramCategories(bool OnlyRecorded) override
Definition: dvr.cpp:802
ScriptableDvr::GetEncoderList
QObject * GetEncoderList()
Definition: dvr.h:426
ScriptableDvr::GetRecordedList
QObject * GetRecordedList(bool Descending, int StartIndex, int Count, const QString &TitleRegEx, const QString &RecGroup, const QString &StorageGroup, const QString &Category, const QString &Sort)
Definition: dvr.h:337
Dvr::AllowReRecord
bool AllowReRecord(int RecordedId) override
Definition: dvr.cpp:427
Dvr::GetTitleInfoList
DTC::TitleInfoList * GetTitleInfoList() override
Definition: dvr.cpp:909
ScriptableDvr::GetConflictList
QObject * GetConflictList(int StartIndex, int Count, int RecordId)
Definition: dvr.h:405
DTC::RecRule::PreferredInput
uint PreferredInput
Definition: recRule.h:44
Dvr::GetOldRecordedList
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
Definition: dvr.cpp:148
DTC::RecRule::SearchType
QString SearchType
Definition: recRule.h:42
DTC::RecRule::AutoUserJob2
bool AutoUserJob2
Definition: recRule.h:64
ScriptableDvr::UnDeleteRecording
bool UnDeleteRecording(int RecordedId)
Definition: dvr.h:398
Dvr::DupMethodToString
QString DupMethodToString(QString DupMethod) override
Definition: dvr.cpp:1664
DTC::RecRule::RecProfile
QString RecProfile
Definition: recRule.h:51
ScriptableDvr::ManageJobQueue
int ManageJobQueue(const QString &Action, const QString &JobName, int JobId, int RecordedId, QDateTime JobStartTime, QString RemoteHost, QString JobArgs)
Definition: dvr.h:657
AutoExpire
Used to expire recordings to make space for new recordings.
Definition: autoexpire.h:62
DTC::TitleInfoList
Definition: titleInfoList.h:25
slots
unsigned int slots[4]
Definition: element.cpp:38
ScriptableDvr::GetRecordScheduleList
QObject * GetRecordScheduleList(int StartIndex, int Count, const QString &Sort, bool Descending)
Definition: dvr.h:560
Dvr::GetInputList
DTC::InputList * GetInputList() override
Definition: dvr.cpp:761
DTC::RecRule::FindTime
QTime FindTime
Definition: recRule.h:40
DTC::RecRuleFilterList
Definition: recRuleFilterList.h:17
Dvr::GetRecordedSeek
DTC::CutList * GetRecordedSeek(int RecordedId, const QString &OffsetType) override
Definition: dvr.cpp:618
DvrServices
Definition: dvrServices.h:46
ScriptableDvr::GetRecorded
QObject * GetRecorded(int RecordedId)
Definition: dvr.h:371
Dvr::RecordedIdForPathname
int RecordedIdForPathname(const QString &pathname) override
Definition: dvr.cpp:1604
Dvr::GetExpiringList
DTC::ProgramList * GetExpiringList(int StartIndex, int Count) override
Definition: dvr.cpp:648
ScriptableDvr::GetUpcomingList
QObject * GetUpcomingList(int StartIndex, int Count, bool ShowAll, int RecordId, int RecStatus)
Definition: dvr.h:414
DTC::RecRule::Episode
uint Episode
Definition: recRule.h:27
Dvr::GetRecordScheduleList
DTC::RecRuleList * GetRecordScheduleList(int StartIndex, int Count, const QString &Sort, bool Descending) override
Definition: dvr.cpp:1438
ScriptableDvr::GetRecordSchedule
QObject * GetRecordSchedule(uint RecordId, QString Template, int RecordedId, int ChanId, QDateTime StartTime, bool MakeOverride)
Definition: dvr.h:570
DTC::RecRule::Title
QString Title
Definition: recRule.h:23
Action
An action (for this plugin) consists of a description, and a set of key sequences.
Definition: action.h:41
ScriptableDvr::RecStatusToString
QString RecStatusToString(int RecStatus)
Definition: dvr.h:597
Dvr::RecStatusToString
QString RecStatusToString(int RecStatus) override
Definition: dvr.cpp:1614
ScriptableDvr::DupInToDescription
QString DupInToDescription(QString DupIn)
Definition: dvr.h:650
Dvr::StopRecording
bool StopRecording(int RecordedId) override
Definition: dvr.cpp:364
DTC::RecRule::Season
uint Season
Definition: recRule.h:26
ScriptableDvr::RemoveRecordSchedule
bool RemoveRecordSchedule(uint RecordId)
Definition: dvr.h:544
DTC::RecRule::AutoExpire
bool AutoExpire
Definition: recRule.h:56
DTC::RecRule::MaxNewest
bool MaxNewest
Definition: recRule.h:58
Dvr::DupMethodToDescription
QString DupMethodToDescription(QString DupMethod) override
Definition: dvr.cpp:1670
Dvr::GetRecordedCutList
DTC::CutList * GetRecordedCutList(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, const QString &OffsetType) override
Definition: dvr.cpp:552
Dvr::GetEncoderList
DTC::EncoderList * GetEncoderList() override
Definition: dvr.cpp:696
Dvr::RescheduleRecordings
bool RescheduleRecordings(void) override
Definition: dvr.cpp:416
Dvr::GetRecorded
DTC::Program * GetRecorded(int RecordedId, int ChanId, const QDateTime &recstarttsRaw) override
Definition: dvr.cpp:265
DTC::RecRuleList
Definition: recRuleList.h:16
DTC::RecRule::Type
QString Type
Definition: recRule.h:41
ScriptableDvr::DupMethodToString
QString DupMethodToString(QString DupMethod)
Definition: dvr.h:629
Dvr::UnDeleteRecording
bool UnDeleteRecording(int RecordedId, int ChanId, const QDateTime &recstarttsRaw) override
Definition: dvr.cpp:333
Dvr::GetRecordedList
DTC::ProgramList * GetRecordedList(bool Descending, int StartIndex, int Count, const QString &TitleRegEx, const QString &RecGroup, const QString &StorageGroup, const QString &Category, const QString &Sort) override
Definition: dvr.cpp:63
ScriptableDvr::AddDontRecordSchedule
bool AddDontRecordSchedule(int ChanId, const QDateTime &StartTime, bool NeverRecord)
Definition: dvr.h:551
ScriptableDvr::UpdateRecordSchedule
bool UpdateRecordSchedule(DTC::RecRule *rule)
Definition: dvr.h:511
DTC::RecRule::Inetref
QString Inetref
Definition: recRule.h:35
Q_SCRIPT_DECLARE_QMETAOBJECT_MYTHTV
#define Q_SCRIPT_DECLARE_QMETAOBJECT_MYTHTV(T, _Arg1)
Definition: service.h:110
DTC::RecRule::LastRecorded
QDateTime LastRecorded
Definition: recRule.h:70
ScriptableDvr::GetTitleList
QStringList GetTitleList(const QString &RecGroup)
Definition: dvr.h:468
Dvr::RemoveRecorded
bool RemoveRecorded(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, bool ForceDelete, bool AllowRerecord) override
Definition: dvr.cpp:289
DTC::RecRule::StartTime
QDateTime StartTime
Definition: recRule.h:30
Dvr::Dvr
Q_INVOKABLE Dvr(QObject *=nullptr)
Definition: dvr.h:39
DTC::RecRule::AutoUserJob3
bool AutoUserJob3
Definition: recRule.h:65
ScriptableDvr::GetPlayGroupList
QStringList GetPlayGroupList()
Definition: dvr.h:454
ScriptableDvr::GetRecRuleFilterList
QObject * GetRecRuleFilterList()
Definition: dvr.h:461
Dvr::UpdateRecordedWatchedStatus
bool UpdateRecordedWatchedStatus(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, bool Watched) override
Definition: dvr.cpp:446
Dvr::GetPlayGroupList
QStringList GetPlayGroupList() override
Definition: dvr.cpp:837
ScriptableDvr::RecTypeToDescription
QString RecTypeToDescription(QString RecType)
Definition: dvr.h:622
DTC::RecRule::Inactive
bool Inactive
Definition: recRule.h:22
Dvr::AddRecordSchedule
uint AddRecordSchedule(const QString &Title, const QString &Subtitle, const QString &Description, const QString &Category, QDateTime recstarttsRaw, 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, QDateTime lastrectsRaw, QString DupMethod, QString DupIn, 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
Definition: dvr.cpp:1090
AutoTranscode
Definition: recordingprofile.cpp:1178
uint
unsigned int uint
Definition: compat.h:140
DTC::RecRule::PlayGroup
QString PlayGroup
Definition: recRule.h:54
DTC::InputList
Definition: inputList.h:25
Dvr::DeleteRecording
bool DeleteRecording(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, bool ForceDelete, bool AllowRerecord) override
Definition: dvr.cpp:298
Dvr::UpdateRecordSchedule
bool UpdateRecordSchedule(uint RecordId, QString Title, QString Subtitle, QString Description, QString Category, QDateTime dStartTimeRaw, QDateTime dEndTimeRaw, QString SeriesId, QString ProgramId, int ChanId, 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, 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
Definition: dvr.cpp:1236
SCRIPT_CATCH_EXCEPTION
#define SCRIPT_CATCH_EXCEPTION(default, code)
Definition: service.h:83
Dvr::RecordedIdForKey
int RecordedIdForKey(int ChanId, const QDateTime &recstarttsRaw) override
Definition: dvr.cpp:1593
PlayGroup
Definition: playgroup.h:12
ScriptableDvr::GetRecStorageGroupList
QStringList GetRecStorageGroupList()
Definition: dvr.h:447
DTC::RecRule::DupMethod
QString DupMethod
Definition: recRule.h:47
Dvr::GetRecStorageGroupList
QStringList GetRecStorageGroupList() override
Definition: dvr.cpp:828
Dvr::AddDontRecordSchedule
bool AddDontRecordSchedule(int ChanId, const QDateTime &StartTime, bool NeverRecord) override
Definition: dvr.cpp:1410
Dvr::GetUpcomingList
DTC::ProgramList * GetUpcomingList(int StartIndex, int Count, bool ShowAll, int RecordId, int RecStatus) override
Definition: dvr.cpp:947
DTC::RecRule::FindDay
int FindDay
Definition: recRule.h:39
DTC::RecRule::AutoCommflag
bool AutoCommflag
Definition: recRule.h:60
DTC::RecRule::AutoMetaLookup
bool AutoMetaLookup
Definition: recRule.h:62
DTC::RecRule::Id
int Id
Definition: recRule.h:20
ScriptableDvr::AddRecordSchedule
uint AddRecordSchedule(DTC::RecRule *rule)
Definition: dvr.h:482
Dvr::DisableRecordSchedule
bool DisableRecordSchedule(uint RecordId) override
Definition: dvr.cpp:1573
ScriptableDvr::DeleteRecording
bool DeleteRecording(int RecordedId, bool ForceDelete, bool AllowRerecord)
Definition: dvr.h:388
DTC::RecRule::Transcoder
int Transcoder
Definition: recRule.h:67
DTC::RecRule::ProgramId
QString ProgramId
Definition: recRule.h:34
ScriptableDvr::GetInputList
QObject * GetInputList()
Definition: dvr.h:433
ScriptableDvr::ScriptableDvr
Q_INVOKABLE ScriptableDvr(QScriptEngine *pEngine, QObject *parent=nullptr)
Definition: dvr.h:322
ScriptableDvr::GetOldRecordedList
QObject * GetOldRecordedList(bool Descending, int StartIndex, int Count, const QDateTime &StartTime, const QDateTime &EndTime, const QString &Title, const QString &SeriesId, int RecordId, const QString &Sort)
Definition: dvr.h:354
ScriptableDvr::GetExpiringList
QObject * GetExpiringList(int StartIndex, int Count)
Definition: dvr.h:329
DTC::RecRule::Filter
uint Filter
Definition: recRule.h:49
ScriptableDvr::RecTypeToString
QString RecTypeToString(QString RecType)
Definition: dvr.h:615
DTC::RecRule::StorageGroup
QString StorageGroup
Definition: recRule.h:53
DTC::RecRule
Definition: recRule.h:16
Dvr::ReactivateRecording
bool ReactivateRecording(int RecordedId, int ChanId, const QDateTime &recstarttsRaw) override
Definition: dvr.cpp:390
DTC::RecRule::EndOffset
int EndOffset
Definition: recRule.h:46
DTC::RecRule::DupIn
QString DupIn
Definition: recRule.h:48
Dvr::RemoveRecordSchedule
bool RemoveRecordSchedule(uint RecordId) override
Definition: dvr.cpp:1395
Dvr::GetTitleList
QStringList GetTitleList(const QString &RecGroup) override
Definition: dvr.cpp:873
DTC::RecRule::AutoUserJob1
bool AutoUserJob1
Definition: recRule.h:63
ScriptableDvr::DisableRecordSchedule
bool DisableRecordSchedule(uint RecordId)
Definition: dvr.h:590
StorageGroup
Definition: storagegroup.h:12
Dvr::GetRecGroupList
QStringList GetRecGroupList() override
Definition: dvr.cpp:779
RecStatus
Definition: recStatus.h:12
Dvr::SetSavedBookmark
bool SetSavedBookmark(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, const QString &OffsetType, long Offset) override
Definition: dvr.cpp:514
DTC::RecRule::ChanId
int ChanId
Definition: recRule.h:37
ScriptableDvr::EnableRecordSchedule
bool EnableRecordSchedule(uint RecordId)
Definition: dvr.h:583
Dvr::ManageJobQueue
int ManageJobQueue(const QString &Action, const QString &JobName, int JobId, int RecordedId, QDateTime jobstarttsRaw, QString RemoteHost, QString JobArgs) override
Definition: dvr.cpp:1680
DTC::ProgramList
Definition: programList.h:27
DTC::RecRule::RecPriority
int RecPriority
Definition: recRule.h:43
DTC::RecRule::SubTitle
QString SubTitle
Definition: recRule.h:24
Dvr::DupInToDescription
QString DupInToDescription(QString DupIn) override
Definition: dvr.cpp:1657
DTC::RecRule::EndTime
QDateTime EndTime
Definition: recRule.h:31
Dvr::GetConflictList
DTC::ProgramList * GetConflictList(int StartIndex, int Count, int RecordId) override
Definition: dvr.cpp:1030
DTC::RecRule::StartOffset
int StartOffset
Definition: recRule.h:45
Dvr::GetRecordedCommBreak
DTC::CutList * GetRecordedCommBreak(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, const QString &OffsetType) override
Definition: dvr.cpp:585
ScriptableDvr::RemoveRecorded
bool RemoveRecorded(int RecordedId, bool ForceDelete, bool AllowRerecord)
Definition: dvr.h:378
dvrServices.h
Dvr::EnableRecordSchedule
bool EnableRecordSchedule(uint RecordId) override
Definition: dvr.cpp:1553
ScriptableDvr::GetTitleInfoList
QObject * GetTitleInfoList()
Definition: dvr.h:475
DTC::RecRule::MaxEpisodes
int MaxEpisodes
Definition: recRule.h:57
DTC::RecRule::ParentId
int ParentId
Definition: recRule.h:21
DTC::EncoderList
Definition: encoderList.h:25
ScriptableDvr::DupMethodToDescription
QString DupMethodToDescription(QString DupMethod)
Definition: dvr.h:636
Dvr::GetSavedBookmark
long GetSavedBookmark(int RecordedId, int ChanId, const QDateTime &recstarttsRaw, const QString &OffsetType) override
Definition: dvr.cpp:475
DTC::RecRule::Description
QString Description
Definition: recRule.h:25
ScriptableDvr::RecStatusToDescription
QString RecStatusToDescription(int RecStatus, int RecType, const QDateTime &StartTime)
Definition: dvr.h:604
DTC::RecRule::Category
QString Category
Definition: recRule.h:28
DTC::CutList
Definition: cutList.h:26
DTC::RecRule::AutoTranscode
bool AutoTranscode
Definition: recRule.h:61