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