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