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