MythTV  master
programinfo.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 
3 #ifndef MYTHPROGRAM_H_
4 #define MYTHPROGRAM_H_
5 
6 // ANSI C
7 #include <cstdint> // for [u]int[32,64]_t
8 #include <utility>
9 #include <vector> // for GetNextRecordingList
10 
11 #include <QStringList>
12 #include <QDateTime>
13 
14 // MythTV headers
15 #include "autodeletedeque.h"
16 #include "recordingtypes.h"
17 #include "programtypes.h"
18 #include "mythdbcon.h"
19 #include "mythexp.h"
20 #include "mythdate.h"
21 #include "mythtypes.h"
22 #include "enums/recStatus.h"
23 
24 /* If NUMPROGRAMLINES gets updated, then MYTH_PROTO_VERSION and MYTH_PROTO_TOKEN
25  in mythversion.h need to be bumped, and also follow the instructions in
26  myth_version.h about other changes needed when the network protocol changes.
27 */
28 #define NUMPROGRAMLINES 52
29 
30 class ProgramInfo;
32 
63 class MSqlQuery;
64 class ProgramInfoUpdater;
65 class PMapDBReplacement;
66 
68 {
69  friend int pginfo_init_statics(void);
70  public:
71  static constexpr int kNumCatTypes = 5;
72  enum CategoryType { kCategoryNone, kCategoryMovie, kCategorySeries,
73  kCategorySports, kCategoryTVShow };
74 
76  ProgramInfo(void) { ensureSortFields(); }
78  ProgramInfo(const ProgramInfo &other);
80  explicit ProgramInfo(uint recordedid);
82  ProgramInfo(uint chanid, const QDateTime &recstartts);
84  ProgramInfo(uint recordedid,
85  QString title,
86  QString sortTitle,
87  QString subtitle,
88  QString sortSubtitle,
89  QString description,
90  uint season,
91  uint episode,
92  uint totalepisodes,
93  QString syndicatedepisode,
94  QString category,
95 
96  uint chanid,
97  QString channum,
98  QString chansign,
99  QString channame,
100  QString chanplaybackfilters,
101 
102  QString recgroup,
103  QString playgroup,
104 
105  const QString &pathname,
106 
107  QString hostname,
108  QString storagegroup,
109 
110  QString seriesid,
111  QString programid,
112  QString inetref,
113  CategoryType catType,
114 
115  int recpriority,
116 
117  uint64_t filesize,
118 
119  QDateTime startts,
120  QDateTime endts,
121  QDateTime recstartts,
122  QDateTime recendts,
123 
124  float stars,
125 
126  uint year,
127  uint partnumber,
128  uint parttotal,
129 
130  const QDate &originalAirDate,
131  QDateTime lastmodified,
132 
133  RecStatus::Type recstatus,
134 
135  uint recordid,
136 
137  RecordingDupInType dupin,
138  RecordingDupMethodType dupmethod,
139 
140  uint findid,
141 
142  uint programflags,
143  uint audioproperties,
144  uint videoproperties,
145  uint subtitleType,
146  QString inputname,
147  QDateTime bookmarkupdate);
148 
150  ProgramInfo(QString title,
151  QString sortTitle,
152  QString subtitle,
153  QString sortSubtitle,
154  QString description,
155  uint season,
156  uint episode,
157  QString category,
158 
159  uint chanid,
160  QString channum,
161  QString chansign,
162  QString channame,
163 
164  QString seriesid,
165  QString programid,
166  QString inetref,
167 
168  QDateTime startts,
169  QDateTime endts,
170  QDateTime recstartts,
171  QDateTime recendts,
172 
173  RecStatus::Type recstatus,
174 
175  uint recordid,
176 
177  RecordingType rectype,
178 
179  uint findid,
180 
181  bool duplicate);
182 
184  ProgramInfo(QString title,
185  QString sortTitle,
186  QString subtitle,
187  QString sortSubtitle,
188  QString description,
189  QString syndicatedepisode,
190  QString category,
191 
192  uint chanid,
193  QString channum,
194  QString chansign,
195  QString channame,
196  QString chanplaybackfilters,
197 
198  QDateTime startts,
199  QDateTime endts,
200  QDateTime recstartts,
201  QDateTime recendts,
202 
203  QString seriesid,
204  QString programid,
205  CategoryType catType,
206 
207  float stars,
208  uint year,
209  uint partnumber,
210  uint parttotal,
211  const QDate &originalAirDate,
212  RecStatus::Type recstatus,
213  uint recordid,
214  RecordingType rectype,
215  uint findid,
216 
217  bool commfree,
218  bool repeat,
219 
220  uint videoproperties,
221  uint audioproperties,
222  uint subtitletype,
223 
224  uint season,
225  uint episode,
226  uint totalepisodes,
227 
228  const ProgramList &schedList);
230  ProgramInfo(QString title,
231  QString sortTitle,
232  QString subtitle,
233  QString sortSubtitle,
234  QString description,
235  uint season,
236  uint episode,
237  uint totalepisodes,
238  QString category,
239 
240  uint chanid,
241  QString channum,
242  QString chansign,
243  QString channame,
244  QString chanplaybackfilters,
245 
246  QString recgroup,
247  QString playgroup,
248 
249  QDateTime startts,
250  QDateTime endts,
251  QDateTime recstartts,
252  QDateTime recendts,
253 
254  QString seriesid,
255  QString programid,
256  QString inetref,
257  QString inputname);
259  explicit ProgramInfo(const QString &pathname);
261  ProgramInfo(const QString &pathname,
262  const QString &plot,
263  const QString &title,
264  const QString &sortTitle,
265  const QString &subtitle,
266  const QString &sortSubtitle,
267  const QString &director,
268  int season, int episode,
269  const QString &inetref,
270  uint length_in_minutes,
271  uint year,
272  const QString &programid);
274  ProgramInfo(const QString &_title, uint _chanid,
275  const QDateTime &_startts, const QDateTime &_endts);
277  ProgramInfo(QString _title, QString _category,
278  QDateTime _startts, QDateTime _endts)
279  : m_title(std::move(_title)), m_category(std::move(_category)),
280  m_startTs(std::move(_startts)), m_endTs(std::move(_endts))
281  { ensureSortFields(); }
282  ProgramInfo(QStringList::const_iterator &it,
283  const QStringList::const_iterator& end)
284  {
285  if (!FromStringList(it, end))
287  }
288  explicit ProgramInfo(const QStringList &list)
289  {
290  QStringList::const_iterator it = list.begin();
291  if (!FromStringList(it, list.end()))
293  }
294 
295  bool operator==(const ProgramInfo& rhs);
296  ProgramInfo &operator=(const ProgramInfo &other);
297  virtual void clone(const ProgramInfo &other,
298  bool ignore_non_serialized_data = false);
299  void ensureSortFields(void);
300 
301  virtual void clear(void);
302 
303  // Destructor
304  virtual ~ProgramInfo() = default;
305 
306  // Serializers
307  void ToStringList(QStringList &list) const;
308  virtual void ToMap(InfoMap &progMap,
309  bool showrerecord = false,
310  uint star_range = 10) const;
311  virtual void SubstituteMatches(QString &str);
312 
313  // Used for scheduling recordings
314  bool IsSameProgram(const ProgramInfo &other) const; // Exact same program
315  bool IsDuplicateProgram(const ProgramInfo &other) const; // Is this program considered a duplicate according to rule type and dup method (scheduler only)
316  bool IsSameProgramAndStartTime(const ProgramInfo &other) const; // Exact same program and same starttime, Any channel
317  bool IsSameTitleStartTimeAndChannel(const ProgramInfo &other) const; // Same title, starttime and channel
318  bool IsSameTitleTimeslotAndChannel(const ProgramInfo &other) const;//sched only - Same title, starttime, endtime and channel
319  static bool UsingProgramIDAuthority(void)
320  {
321  return s_usingProgIDAuth;
322  };
323  static void CheckProgramIDAuthorities(void);//sched only
324 
325  // Used for extending scheduled recordings
326  bool IsSameProgramWeakCheck(const ProgramInfo &other) const;
327  bool IsSameRecording(const ProgramInfo &other) const
328  { return m_chanId == other.m_chanId && m_recStartTs == other.m_recStartTs; }
329  bool IsSameChannel(const ProgramInfo &other) const;
330 
331  // Quick gets
334  QString MakeUniqueKey(void) const
335  { return MakeUniqueKey(m_chanId, m_recStartTs); }
336  uint GetSecondsInRecording(void) const;
337  QString ChannelText(const QString& format) const;
338  QString GetPathname(void) const { return m_pathname; }
339  QString GetBasename(void) const { return m_pathname.section('/', -1); }
340  bool IsVideoFile(void) const
341  { return GetProgramInfoType() == kProgramInfoTypeVideoFile; }
342  bool IsVideoDVD(void) const
343  { return GetProgramInfoType() == kProgramInfoTypeVideoDVD; }
344  bool IsVideoBD(void) const
345  { return GetProgramInfoType() == kProgramInfoTypeVideoBD; }
346  bool IsLocal(void) const { return m_pathname.startsWith("/")
347 #ifdef _WIN32
348  || m_pathname.at(1) == ':'
349 #endif
350  ; }
351  bool IsMythStream(void) const { return m_pathname.startsWith("myth://"); }
352  bool IsPathSet(void) const { return GetBasename() != m_pathname; }
353  bool HasPathname(void) const { return !GetPathname().isEmpty(); }
354  bool IsFileReadable(void);
355 
356  QString GetTitle(void) const { return m_title; }
357  QString GetSortTitle(void) const { return m_sortTitle; }
358  QString GetSubtitle(void) const { return m_subtitle; }
359  QString GetSortSubtitle(void) const { return m_sortSubtitle; }
360  QString GetDescription(void) const { return m_description; }
361  uint GetSeason(void) const { return m_season; }
362  uint GetEpisode(void) const { return m_episode; }
363  uint GetEpisodeTotal(void) const { return m_totalEpisodes; }
364  QString GetCategory(void) const { return m_category; }
367  uint GetChanID(void) const { return m_chanId; }
371  QString GetChanNum(void) const { return m_chanStr; }
378  QString GetChannelSchedulingID(void) const { return m_chanSign; }
381  QString GetChannelName(void) const { return m_chanName; }
382  QString GetChannelPlaybackFilters(void) const
383  { return m_chanPlaybackFilters; }
385  QDateTime GetScheduledStartTime(void) const { return m_startTs; }
388  {
389  return MythDate::toString(m_startTs, fmt);
390  }
392  QDateTime GetScheduledEndTime(void) const { return m_endTs; }
395  {
396  return MythDate::toString(m_endTs, fmt);
397  }
399  QDateTime GetRecordingStartTime(void) const { return m_recStartTs; }
402  {
403  return MythDate::toString(m_recStartTs, fmt);
404  }
407  QDateTime GetRecordingEndTime(void) const { return m_recEndTs; }
411  {
412  return MythDate::toString(m_recEndTs, fmt);
413  }
414  QString GetRecordingGroup(void) const { return m_recGroup; }
415  QString GetPlaybackGroup(void) const { return m_playGroup; }
416  QString GetHostname(void) const { return m_hostname; }
417  QString GetStorageGroup(void) const { return m_storageGroup; }
419  {
420  return ((m_year) ? m_year :
421  (m_originalAirDate.isValid()) ? m_originalAirDate.year() : 0);
422  }
423  QDate GetOriginalAirDate(void) const { return m_originalAirDate; }
424  QDateTime GetLastModifiedTime(void) const { return m_lastModified; }
426  {
427  return MythDate::toString(m_lastModified, fmt);
428  }
429  virtual uint64_t GetFilesize(void) const; // TODO Remove
430  QString GetSeriesID(void) const { return m_seriesId; }
431  QString GetProgramID(void) const { return m_programId; }
432  QString GetInetRef(void) const { return m_inetRef; }
433  CategoryType GetCategoryType(void) const { return m_catType; }
434  QString GetCategoryTypeString(void) const;
435  int GetRecordingPriority(void) const { return m_recPriority; }
436  int GetRecordingPriority2(void) const { return m_recPriority2; }
437  float GetStars(void) const { return m_stars; }
438  uint GetStars(uint range_max) const
439  { return lroundf(m_stars * range_max); }
440 
441  uint GetRecordingID(void) const { return m_recordedId; }
443  { return (RecStatus::Type)m_recStatus; }
444  uint GetRecordingRuleID(void) const { return m_recordId; }
445  uint GetParentRecordingRuleID(void) const { return m_parentId; }
447  { return (RecordingType)m_recType; }
448 
451  { return (RecordingDupInType)m_dupIn; }
452 
455  { return (RecordingDupMethodType)m_dupMethod; }
456 
457  uint GetSourceID(void) const { return m_sourceId; }
458  uint GetInputID(void) const { return m_inputId; }
459  QString GetInputName(void) const { return m_inputName; }
460  QString GetShortInputName(void) const
461  { return m_inputName.isRightToLeft() ?
462  m_inputName.left(2) : m_inputName.right(2); }
463  void ClearInputName(void) { m_inputName.clear(); }
464 
465  uint GetFindID(void) const { return m_findId; }
466 
467  uint32_t GetProgramFlags(void) const { return m_programFlags; }
469  { return (ProgramInfoType)((m_programFlags & FL_TYPEMASK) >> 20); }
470  QDateTime GetBookmarkUpdate(void) const { return m_bookmarkUpdate; }
471  bool IsGeneric(void) const;
472  bool IsInUsePlaying(void) const { return (m_programFlags & FL_INUSEPLAYING) != 0U;}
473  bool IsCommercialFree(void) const { return (m_programFlags & FL_CHANCOMMFREE) != 0U;}
474  bool HasCutlist(void) const { return (m_programFlags & FL_CUTLIST) != 0U; }
475  bool IsBookmarkSet(void) const { return (m_programFlags & FL_BOOKMARK) != 0U; }
476  bool IsWatched(void) const { return (m_programFlags & FL_WATCHED) != 0U; }
477  bool IsAutoExpirable(void) const { return (m_programFlags & FL_AUTOEXP) != 0U; }
478  bool IsPreserved(void) const { return (m_programFlags & FL_PRESERVED) != 0U; }
479  bool IsVideo(void) const { return (m_programFlags & FL_TYPEMASK) != 0U; }
480  bool IsRecording(void) const { return !IsVideo(); }
481  bool IsRepeat(void) const { return (m_programFlags & FL_REPEAT) != 0U; }
482  bool IsDuplicate(void) const { return (m_programFlags & FL_DUPLICATE) != 0U; }
483  bool IsReactivated(void) const { return (m_programFlags & FL_REACTIVATE) != 0U; }
484  bool IsDeletePending(void) const
485  { return (m_programFlags & FL_DELETEPENDING) != 0U; }
486 
487  uint GetSubtitleType(void) const
488  { return (m_properties&kSubtitlePropertyMask)>>kSubtitlePropertyOffset; }
490  { return (m_properties & kVideoPropertyMask) >> kVideoPropertyOffset; }
492  { return (m_properties & kAudioPropertyMask) >> kAudioPropertyOffset; }
493 
495  {
500  };
501  QString toString(Verbosity v = kLongDescription, const QString& sep = ":",
502  const QString& grp = "\"") const;
503 
504  // Quick sets
505  void SetTitle(const QString &t, const QString &st = nullptr);
506  void SetSubtitle(const QString &st, const QString &sst = nullptr);
508  { m_programFlags &= ~FL_TYPEMASK; m_programFlags |= ((uint32_t)t<<20); }
509  void SetPathname(const QString& pn);
510  void SetChanID(uint _chanid) { m_chanId = _chanid; }
511  void SetScheduledStartTime(const QDateTime &dt) { m_startTs = dt; }
512  void SetScheduledEndTime( const QDateTime &dt) { m_endTs = dt; }
513  void SetRecordingStartTime(const QDateTime &dt) { m_recStartTs = dt; }
514  void SetRecordingEndTime( const QDateTime &dt) { m_recEndTs = dt; }
515  void SetRecordingGroup(const QString &group) { m_recGroup = group; }
516  void SetPlaybackGroup( const QString &group) { m_playGroup = group; }
517  void SetHostname( const QString &host) { m_hostname = host; }
518  void SetStorageGroup( const QString &group) { m_storageGroup = group; }
519  virtual void SetFilesize( uint64_t sz);
520  void SetSeriesID( const QString &id) { m_seriesId = id; }
521  void SetProgramID( const QString &id) { m_programId = id; }
522  void SetCategory( const QString &cat) { m_category = cat; }
523  void SetCategoryType( const CategoryType type) { m_catType = type; }
524  void SetRecordingPriority(int priority) { m_recPriority = priority; }
525  void SetRecordingPriority2(int priority) { m_recPriority2 = priority; }
526  void SetRecordingRuleID(uint id) { m_recordId = id; }
527  void SetSourceID(uint id) { m_sourceId = id; }
528  void SetInputID(uint id) { m_inputId = id; }
529  void SetReactivated(bool reactivate)
530  {
531  m_programFlags &= ~FL_REACTIVATE;
532  m_programFlags |= (reactivate) ? FL_REACTIVATE : 0;
533  }
534  void SetEditing(bool editing)
535  {
536  m_programFlags &= ~FL_EDITING;
537  m_programFlags |= (editing) ? FL_EDITING : 0;
538  }
539  void SetFlagging(bool flagging)
540  {
541  m_programFlags &= ~FL_COMMFLAG;
542  m_programFlags |= (flagging) ? FL_COMMFLAG : 0;
543  }
546  void SetIgnoreBookmark(bool ignore)
547  {
548  m_programFlags &= ~FL_IGNOREBOOKMARK;
549  m_programFlags |= (ignore) ? FL_IGNOREBOOKMARK : 0;
550  }
553  void SetIgnoreProgStart(bool ignore)
554  {
555  m_programFlags &= ~FL_IGNOREPROGSTART;
556  m_programFlags |= (ignore) ? FL_IGNOREPROGSTART : 0;
557  }
561  void SetAllowLastPlayPos(bool allow)
562  {
563  m_programFlags &= ~FL_ALLOWLASTPLAYPOS;
564  m_programFlags |= (allow) ? FL_ALLOWLASTPLAYPOS : 0;
565  }
566  virtual void SetRecordingID(uint _recordedid)
567  { m_recordedId = _recordedid; }
568  void SetRecordingStatus(RecStatus::Type status) { m_recStatus = status; }
571  { m_positionMapDBReplacement = pmap; }
572 
573  // Slow DB gets
574  QString QueryBasename(void) const;
575 // uint64_t QueryFilesize(void) const; // TODO Remove
576  uint QueryMplexID(void) const;
577  QDateTime QueryBookmarkTimeStamp(void) const;
578  uint64_t QueryBookmark(void) const;
579  uint64_t QueryProgStart(void) const;
580  uint64_t QueryLastPlayPos(void) const;
581  CategoryType QueryCategoryType(void) const;
582  QStringList QueryDVDBookmark(const QString &serialid) const;
583  QStringList QueryBDBookmark(const QString &serialid) const;
584  bool QueryIsEditing(void) const;
585  bool QueryIsInUse(QStringList &byWho) const;
586  bool QueryIsInUse(QString &byWho) const;
587  bool QueryIsDeleteCandidate(bool one_playback_allowed = false) const;
588  AutoExpireType QueryAutoExpire(void) const;
589  TranscodingStatus QueryTranscodeStatus(void) const;
590  bool QueryTuningInfo(QString &channum, QString &input) const;
591  QString QueryInputDisplayName(void) const;
592  uint QueryAverageWidth(void) const;
593  uint QueryAverageHeight(void) const;
594  uint QueryAverageFrameRate(void) const;
595  MarkTypes QueryAverageAspectRatio(void) const;
596  bool QueryAverageScanProgressive(void) const;
597  uint32_t QueryTotalDuration(void) const;
598  int64_t QueryTotalFrames(void) const;
599  QString QueryRecordingGroup(void) const;
600  bool QueryMarkupFlag(MarkTypes type) const;
601  uint QueryTranscoderID(void) const;
602  uint64_t QueryLastFrameInPosMap(void) const;
603  bool Reload(void);
604 
605  // Slow DB sets
606  virtual void SaveFilesize(uint64_t fsize);
607  void SaveBookmark(uint64_t frame);
608  static void SaveDVDBookmark(const QStringList &fields) ;
609  static void SaveBDBookmark(const QStringList &fields) ;
610  void SaveEditing(bool edit);
611  void SaveTranscodeStatus(TranscodingStatus trans);
612  void SaveWatched(bool watchedFlag);
613  void SaveDeletePendingFlag(bool deleteFlag);
614  void SaveCommFlagged(CommFlagStatus flag); // 1 = flagged, 2 = processing
615  void SaveAutoExpire(AutoExpireType autoExpire, bool updateDelete = false);
616  void SavePreserve(bool preserveEpisode);
617  bool SaveBasename(const QString &basename);
618  void SaveAspect(uint64_t frame, MarkTypes type, uint customAspect);
619  void SaveResolution(uint64_t frame, uint width, uint height);
620  void SaveFrameRate(uint64_t frame, uint framerate);
621  void SaveVideoScanType(uint64_t frame, bool progressive);
622  void SaveTotalDuration(int64_t duration);
623  void SaveTotalFrames(int64_t frames);
624  void SaveVideoProperties(uint mask, uint video_property_flags);
625  void SaveMarkupFlag(MarkTypes type) const;
626  void ClearMarkupFlag(MarkTypes type) const { ClearMarkupMap(type); }
627  void UpdateLastDelete(bool setTime) const;
628  void MarkAsInUse(bool inuse, const QString& usedFor = "");
629  void UpdateInUseMark(bool force = false);
630  void SaveSeasonEpisode(uint seas, uint ep);
631  void SaveInetRef(const QString &inet);
632 
633  // Extremely slow functions that cannot be called from the UI thread.
634  QString DiscoverRecordingDirectory(void);
635  QString GetPlaybackURL(bool checkMaster = false,
636  bool forceCheckLocal = false);
637  ProgramInfoType DiscoverProgramInfoType(void) const;
638 
639  // Edit flagging map
640  bool QueryCutList(frm_dir_map_t &delMap, bool loadAutosave=false) const;
641  void SaveCutList(frm_dir_map_t &delMap, bool isAutoSave=false) const;
642 
643  // Commercial flagging map
644  void QueryCommBreakList(frm_dir_map_t &frames) const;
645  void SaveCommBreakList(frm_dir_map_t &frames) const;
646 
647  // Keyframe positions map
648  void QueryPositionMap(frm_pos_map_t &posMap, MarkTypes type) const;
649  void ClearPositionMap(MarkTypes type) const;
650  void SavePositionMap(frm_pos_map_t &posMap, MarkTypes type,
651  int64_t min_frame = -1, int64_t max_frame = -1) const;
652  void SavePositionMapDelta(frm_pos_map_t &posMap, MarkTypes type) const;
653 
654  // Get position/duration for keyframe and vice versa
655  bool QueryKeyFrameInfo(uint64_t *result, uint64_t position_or_keyframe,
656  bool backwards,
657  MarkTypes type, const char *from_filemarkup_asc,
658  const char *from_filemarkup_desc,
659  const char *from_recordedseek_asc,
660  const char *from_recordedseek_desc) const;
661  bool QueryKeyFramePosition(uint64_t *position, uint64_t keyframe,
662  bool backwards) const;
663  bool QueryPositionKeyFrame(uint64_t *keyframe, uint64_t position,
664  bool backwards) const;
665  bool QueryKeyFrameDuration(uint64_t *duration, uint64_t keyframe,
666  bool backwards) const;
667  bool QueryDurationKeyFrame(uint64_t *keyframe, uint64_t duration,
668  bool backwards) const;
669 
670  // Get/set all markup
671  struct MarkupEntry
672  {
673  int type { -1 }; // MarkTypes
674  uint64_t frame { 0 };
675  uint64_t data { 0 };
676  bool isDataNull { true };
677  MarkupEntry(int t, uint64_t f, uint64_t d, bool n)
678  : type(t), frame(f), data(d), isDataNull(n) {}
679  MarkupEntry(void) = default;
680  };
681  void QueryMarkup(QVector<MarkupEntry> &mapMark,
682  QVector<MarkupEntry> &mapSeek) const;
683  void SaveMarkup(const QVector<MarkupEntry> &mapMark,
684  const QVector<MarkupEntry> &mapSeek) const;
685 
687  void SendUpdateEvent(void) const;
689  void SendAddedEvent(void) const;
691  void SendDeletedEvent(void) const;
692 
694  static QString i18n(const QString &msg);
695 
696  static QString MakeUniqueKey(uint chanid, const QDateTime &recstartts);
697  static bool ExtractKey(const QString &uniquekey,
698  uint &chanid, QDateTime &recstartts);
699  static bool ExtractKeyFromPathname(
700  const QString &pathname, uint &chanid, QDateTime &recstartts);
701  static bool QueryKeyFromPathname(
702  const QString &pathname, uint &chanid, QDateTime &recstartts);
703  static bool QueryRecordedIdFromPathname(const QString &pathname,
704  uint &recordedid);
705 
706  static QString QueryRecordingGroupPassword(const QString &group);
707  static uint64_t QueryBookmark(uint chanid, const QDateTime &recstartts);
708  static QMap<QString,uint32_t> QueryInUseMap(void);
709  static QMap<QString,bool> QueryJobsRunning(int type);
710  static QStringList LoadFromScheduler(const QString &tmptable, int recordid);
711 
712  // Flagging map support methods
713  void QueryMarkupMap(frm_dir_map_t&marks, MarkTypes type,
714  bool merge = false) const;
715  void SaveMarkupMap(const frm_dir_map_t &marks, MarkTypes type = MARK_ALL,
716  int64_t min_frame = -1, int64_t max_frame = -1) const;
717  void ClearMarkupMap(MarkTypes type = MARK_ALL,
718  int64_t min_frame = -1, int64_t max_frame = -1) const;
719 
720  protected:
721  // Creates a basename from the start and end times
722  QString CreateRecordBasename(const QString &ext) const;
723 
724  bool LoadProgramFromRecorded(
725  uint chanid, const QDateTime &recstartts);
726 
727  bool FromStringList(QStringList::const_iterator &it,
728  const QStringList::const_iterator& end);
729 
730  static void QueryMarkupMap(
731  const QString &video_pathname,
732  frm_dir_map_t &marks, MarkTypes type, bool merge = false);
733  static void QueryMarkupMap(
734  uint chanid, const QDateTime &recstartts,
735  frm_dir_map_t &marks, MarkTypes type, bool merge = false);
736 
737  static int InitStatics(void);
738 
739  protected:
740  QString m_title;
741  QString m_sortTitle;
742  QString m_subtitle;
743  QString m_sortSubtitle;
744  QString m_description;
745  uint m_season {0};
746  uint m_episode {0};
747  uint m_totalEpisodes {0};
749  QString m_category;
750  QString m_director;
751 
752  int32_t m_recPriority {0};
753 
754  uint32_t m_chanId {0};
755  QString m_chanStr; // Channum
756  QString m_chanSign; // Callsign
757  QString m_chanName;
759 
760  QString m_recGroup {"Default"};
761  QString m_playGroup {"Default"};
762 
763  mutable QString m_pathname;
764 
765  QString m_hostname;
766  QString m_storageGroup {"Default"};
767 
768  QString m_seriesId;
769  QString m_programId;
770  QString m_inetRef;
771  CategoryType m_catType {kCategoryNone};
772 
773  uint64_t m_fileSize {0ULL};
774 
775  QDateTime m_startTs {MythDate::current(true)};
776  QDateTime m_endTs {m_startTs};
777  QDateTime m_recStartTs {m_startTs};
778  QDateTime m_recEndTs {m_startTs};
779 
780  float m_stars {0.0F};
782  QDateTime m_lastModified {m_startTs};
783  QDateTime m_lastInUseTime {m_startTs.addSecs(-4 * 60 * 60)};
784 
785  int32_t m_recPriority2 {0};
786 
787  uint32_t m_recordId {0};
788  uint32_t m_parentId {0};
789 
790  uint32_t m_sourceId {0};
791  uint32_t m_inputId {0};
792  uint32_t m_findId {0};
793 
794  uint32_t m_programFlags {FL_NONE};
795  uint16_t m_properties {0};
797  uint16_t m_year {0};
798  uint16_t m_partNumber {0};
799  uint16_t m_partTotal {0};
800 
801  int8_t m_recStatus {RecStatus::Unknown};
802  uint8_t m_recType {kNotRecording};
803  uint8_t m_dupIn {kDupsInAll};
804  uint8_t m_dupMethod {kDupCheckSubThenDesc};
805 
806  uint m_recordedId {0};
807  QString m_inputName;
808  QDateTime m_bookmarkUpdate;
809 
810 // everything below this line is not serialized
811  uint8_t m_availableStatus {asAvailable}; // only used for playbackbox.cpp
812  public:
813  void SetAvailableStatus(AvailableStatusType status, const QString &where);
815  { return (AvailableStatusType) m_availableStatus; }
816  int8_t m_spread {-1}; // only used in guidegrid.cpp
817  int8_t m_startCol {-1}; // only used in guidegrid.cpp
818 
819  static const QString kFromRecordedQuery;
820 
821  protected:
822  QString m_inUseForWhat;
823  PMapDBReplacement *m_positionMapDBReplacement {nullptr};
824 
825  static QMutex s_staticDataLock;
827  static bool s_usingProgIDAuth;
828 };
829 
831  ProgramList &destination,
832  const QString &where,
833  const QString &groupBy,
834  const QString &orderBy,
835  const MSqlBindings &bindings,
836  const ProgramList &schedList);
837 
839  ProgramList &destination,
840  const QString &sql,
841  const MSqlBindings &bindings,
842  const ProgramList &schedList);
843 
845  ProgramList &destination,
846  const QString &sql,
847  const MSqlBindings &bindings,
848  const ProgramList &schedList,
849  const uint &start,
850  const uint &limit,
851  uint &count);
852 
854  uint chanid, const QDateTime &starttime);
855 
857  ProgramList &destination,
858  const QString &sql,
859  const MSqlBindings &bindings);
860 
862  ProgramList &destination,
863  const QString &sql,
864  const MSqlBindings &bindings,
865  const uint &start,
866  const uint &limit,
867  uint &count);
868 
870  ProgramList &destination,
871  bool possiblyInProgressRecordingsOnly,
872  const QMap<QString,uint32_t> &inUseMap,
873  const QMap<QString,bool> &isJobRunning,
874  const QMap<QString, ProgramInfo*> &recMap,
875  int sort = 0,
876  const QString &sortBy = "");
877 
878 
879 template<typename TYPE>
881  AutoDeleteDeque<TYPE*> &destination,
882  bool &hasConflicts,
883  const QString& altTable = "",
884  int recordid = -1)
885 {
886  destination.clear();
887  hasConflicts = false;
888 
889  QStringList slist = ProgramInfo::LoadFromScheduler(altTable, recordid);
890  if (slist.empty())
891  return false;
892 
893  hasConflicts = slist[0].toInt();
894 
895  QStringList::const_iterator sit = slist.begin()+2;
896  while (sit != slist.end())
897  {
898  TYPE *p = new TYPE(sit, slist.end());
899  destination.push_back(p);
900 
901  if (!p->HasPathname() && !p->GetChanID())
902  {
903  delete p;
904  destination.clear();
905  return false;
906  }
907  }
908 
909  if (destination.size() != slist[1].toUInt())
910  {
911  destination.clear();
912  return false;
913  }
914 
915  return true;
916 }
917 
918 template<typename T>
920 {
921  bool dummyConflicts = false;
922  return LoadFromScheduler(destination, dummyConflicts, "", -1);
923 }
924 
925 // Moved from programdetails.cpp/h, used by MythWelcome/MythShutdown
926 // could be factored out
927 MPUBLIC bool GetNextRecordingList(QDateTime &nextRecordingStart,
928  bool *hasConflicts = nullptr,
929  std::vector<ProgramInfo> *list = nullptr);
930 
931 class QMutex;
933 {
934  public:
937  QMutex *lock;
938  QMap<MarkTypes,frm_pos_map_t> map;
939 };
940 
941 MPUBLIC QString format_season_and_episode(int seasEp, int digits = -1);
942 
945 
947 
948 #endif // MYTHPROGRAM_H_
949 
950 /* vim: set expandtab tabstop=4 shiftwidth=4: */
force
bool force
Definition: mythtv/programs/mythcommflag/main.cpp:68
ProgramInfo::SetProgramInfoType
void SetProgramInfoType(ProgramInfoType t)
Definition: programinfo.h:507
ProgramInfo::GetSortTitle
QString GetSortTitle(void) const
Definition: programinfo.h:357
MSqlBindings
QMap< QString, QVariant > MSqlBindings
typedef for a map of string -> string bindings for generic queries.
Definition: mythdbcon.h:98
RecStatus::Type
Type
Definition: recStatus.h:16
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
ProgramInfo::IsMythStream
bool IsMythStream(void) const
Definition: programinfo.h:351
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(GrabberScript *)
MPUBLIC
#define MPUBLIC
Definition: mythexp.h:10
ProgramInfo::MakeUniqueKey
QString MakeUniqueKey(void) const
Creates a unique string that can be used to identify an existing recording.
Definition: programinfo.h:334
MythDate::toString
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
Definition: mythdate.cpp:80
ProgramInfo::IsDuplicate
bool IsDuplicate(void) const
Definition: programinfo.h:482
FL_WATCHED
@ FL_WATCHED
Definition: programtypes.h:142
ProgramInfo::m_title
QString m_title
Definition: programinfo.h:740
LoadFromScheduler
bool LoadFromScheduler(AutoDeleteDeque< TYPE * > &destination, bool &hasConflicts, const QString &altTable="", int recordid=-1)
Definition: programinfo.h:880
ProgramInfo::SetRecordingStatus
void SetRecordingStatus(RecStatus::Type status)
Definition: programinfo.h:568
ProgramInfo::GetHostname
QString GetHostname(void) const
Definition: programinfo.h:416
ProgramInfo::Verbosity
Verbosity
Definition: programinfo.h:494
ProgramInfo::m_inUseForWhat
QString m_inUseForWhat
Definition: programinfo.h:822
ProgramInfo::ClearInputName
void ClearInputName(void)
Definition: programinfo.h:463
ProgramInfo::GetInputName
QString GetInputName(void) const
Definition: programinfo.h:459
ProgramInfo::m_chanId
uint32_t m_chanId
Definition: programinfo.h:754
ProgramInfo::SetCategory
void SetCategory(const QString &cat)
Definition: programinfo.h:522
ProgramInfo::GetRecordingStartTime
QString GetRecordingStartTime(MythDate::Format fmt) const
Approximate time the recording started (with formatting).
Definition: programinfo.h:401
ProgramInfo::m_recStartTs
QDateTime m_recStartTs
Definition: programinfo.h:777
FL_DUPLICATE
@ FL_DUPLICATE
Definition: programtypes.h:146
ProgramInfo::SetRecordingID
virtual void SetRecordingID(uint _recordedid)
Definition: programinfo.h:566
kDupCheckSubThenDesc
@ kDupCheckSubThenDesc
Definition: recordingtypes.h:62
ProgramInfo::m_description
QString m_description
Definition: programinfo.h:744
asAvailable
@ asAvailable
Definition: programtypes.h:219
title
QString title
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:633
kSubtitlePropertyMask
#define kSubtitlePropertyMask
Definition: programtypes.h:215
ProgramInfo::s_staticDataLock
static QMutex s_staticDataLock
Definition: programinfo.h:825
ProgramInfo::MarkupEntry::MarkupEntry
MarkupEntry(int t, uint64_t f, uint64_t d, bool n)
Definition: programinfo.h:677
mythexp.h
ProgramInfo::GetChannelName
QString GetChannelName(void) const
This is the channel name in the local market, i.e.
Definition: programinfo.h:381
ProgramInfo::GetRecordingID
uint GetRecordingID(void) const
Definition: programinfo.h:441
d
static const uint16_t * d
Definition: iso6937tables.cpp:1025
hardwareprofile.devicelist.cat
def cat(file_name)
Definition: devicelist.py:95
PMapDBReplacement
Definition: programinfo.h:932
ProgramInfo::GetChanNum
QString GetChanNum(void) const
This is the channel "number", in the form 1, 1_2, 1-2, 1#1, etc.
Definition: programinfo.h:371
FL_REACTIVATE
@ FL_REACTIVATE
Definition: programtypes.h:147
ProgramInfo::SetSeriesID
void SetSeriesID(const QString &id)
TODO Move to RecordingInfo.
Definition: programinfo.h:520
AutoDeleteDeque::clear
void clear(void)
Definition: autodeletedeque.h:40
ProgramInfo::kTitleSubtitle
@ kTitleSubtitle
Definition: programinfo.h:497
LoadProgramFromProgram
MPUBLIC ProgramInfo * LoadProgramFromProgram(uint chanid, const QDateTime &starttime)
Definition: programinfo.cpp:5616
mythdbcon.h
ProgramInfo::GetChannelSchedulingID
QString GetChannelSchedulingID(void) const
This is the unique programming identifier of a channel.
Definition: programinfo.h:378
ProgramInfo::GetCategory
QString GetCategory(void) const
Definition: programinfo.h:364
frm_dir_map_t
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
Definition: programtypes.h:82
RecStatus::Unknown
@ Unknown
Definition: recStatus.h:32
RecordingDupMethodType
RecordingDupMethodType
Definition: recordingtypes.h:55
ProgramInfo::SetEditing
void SetEditing(bool editing)
Definition: programinfo.h:534
ProgramInfo::s_usingProgIDAuth
static bool s_usingProgIDAuth
Definition: programinfo.h:827
FL_INUSEPLAYING
@ FL_INUSEPLAYING
Definition: programtypes.h:154
ProgramInfo::SetHostname
void SetHostname(const QString &host)
Definition: programinfo.h:517
ProgramInfo::UsingProgramIDAuthority
static bool UsingProgramIDAuthority(void)
Definition: programinfo.h:319
category
QString category
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:1419
MythDate::Format
Format
Definition: mythdate.h:12
ProgramInfo::SetScheduledStartTime
void SetScheduledStartTime(const QDateTime &dt)
Definition: programinfo.h:511
ProgramInfo::ProgramInfo
ProgramInfo(QString _title, QString _category, QDateTime _startts, QDateTime _endts)
Constructs a Dummy ProgramInfo (used by GuideGrid)
Definition: programinfo.h:277
AvailableStatusType
AvailableStatusType
Definition: programtypes.h:218
ProgramInfo::IsPathSet
bool IsPathSet(void) const
Definition: programinfo.h:352
ProgramInfo::IsReactivated
bool IsReactivated(void) const
Definition: programinfo.h:483
ProgramInfo::IsInUsePlaying
bool IsInUsePlaying(void) const
Definition: programinfo.h:472
ProgramInfo::GetScheduledEndTime
QDateTime GetScheduledEndTime(void) const
The scheduled end time of the program.
Definition: programinfo.h:392
ProgramInfo::m_bookmarkUpdate
QDateTime m_bookmarkUpdate
Definition: programinfo.h:808
LoadFromRecorded
MPUBLIC bool LoadFromRecorded(ProgramList &destination, bool possiblyInProgressRecordingsOnly, const QMap< QString, uint32_t > &inUseMap, const QMap< QString, bool > &isJobRunning, const QMap< QString, ProgramInfo * > &recMap, int sort=0, const QString &sortBy="")
Definition: programinfo.cpp:5816
ProgramInfo::SetProgramID
void SetProgramID(const QString &id)
Definition: programinfo.h:521
ProgramInfo::m_pathname
QString m_pathname
Definition: programinfo.h:763
autodeletedeque.h
ProgramInfo::GetRecordingEndTime
QString GetRecordingEndTime(MythDate::Format fmt) const
Approximate time the recording should have ended, did end, or is intended to end (with formatting).
Definition: programinfo.h:410
ProgramInfo::IsSameRecording
bool IsSameRecording(const ProgramInfo &other) const
Definition: programinfo.h:327
recordingtypes.h
ProgramInfo::GetRecordingEndTime
QDateTime GetRecordingEndTime(void) const
Approximate time the recording should have ended, did end, or is intended to end.
Definition: programinfo.h:407
ProgramInfo::GetProgramFlags
uint32_t GetProgramFlags(void) const
Definition: programinfo.h:467
ProgramInfo::GetRecordingGroup
QString GetRecordingGroup(void) const
Definition: programinfo.h:414
ProgramInfo::GetRecordingPriority
int GetRecordingPriority(void) const
Definition: programinfo.h:435
kProgramInfoTypeVideoBD
@ kProgramInfoTypeVideoBD
Definition: programtypes.h:164
FL_AUTOEXP
@ FL_AUTOEXP
Definition: programtypes.h:135
LoadFromOldRecorded
MPUBLIC bool LoadFromOldRecorded(ProgramList &destination, const QString &sql, const MSqlBindings &bindings)
Definition: programinfo.cpp:5652
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:10
kDupsInAll
@ kDupsInAll
Definition: recordingtypes.h:47
ProgramInfo::GetRecordingStartTime
QDateTime GetRecordingStartTime(void) const
Approximate time the recording started.
Definition: programinfo.h:399
ProgramInfo::GetPathname
QString GetPathname(void) const
Definition: programinfo.h:338
ProgramInfo::IsWatched
bool IsWatched(void) const
Definition: programinfo.h:476
programtypes.h
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
ProgramInfo::IsPreserved
bool IsPreserved(void) const
Definition: programinfo.h:478
ProgramInfo::GetScheduledStartTime
QString GetScheduledStartTime(MythDate::Format fmt) const
The scheduled start time of program (with formatting).
Definition: programinfo.h:387
ProgramInfo::IsRepeat
bool IsRepeat(void) const
Definition: programinfo.h:481
ProgramInfo::GetInetRef
QString GetInetRef(void) const
Definition: programinfo.h:432
ProgramInfo::GetYearOfInitialRelease
uint GetYearOfInitialRelease(void) const
Definition: programinfo.h:418
RecordingDupInType
RecordingDupInType
Definition: recordingtypes.h:42
kAudioPropertyMask
#define kAudioPropertyMask
Definition: programtypes.h:180
ProgramInfo::m_hostname
QString m_hostname
Definition: programinfo.h:765
ProgramInfo::kFromRecordedQuery
static const QString kFromRecordedQuery
Definition: programinfo.h:819
ProgramInfo::GetLastModifiedTime
QString GetLastModifiedTime(MythDate::Format fmt) const
Definition: programinfo.h:425
toString
QString toString(MarkTypes type)
Definition: programtypes.cpp:26
ProgramInfo::IsVideoBD
bool IsVideoBD(void) const
Definition: programinfo.h:344
ProgramInfo::m_chanName
QString m_chanName
Definition: programinfo.h:757
mythdate.h
ProgramInfo::SetRecordingEndTime
void SetRecordingEndTime(const QDateTime &dt)
Definition: programinfo.h:514
ProgramInfo::GetScheduledStartTime
QDateTime GetScheduledStartTime(void) const
The scheduled start time of program.
Definition: programinfo.h:385
ProgramInfo::GetRecordingStatus
RecStatus::Type GetRecordingStatus(void) const
Definition: programinfo.h:442
ProgramInfo::m_category
QString m_category
Definition: programinfo.h:749
ProgramInfo::SetScheduledEndTime
void SetScheduledEndTime(const QDateTime &dt)
Definition: programinfo.h:512
ProgramInfo::SetInputID
void SetInputID(uint id)
Definition: programinfo.h:528
hardwareprofile.config.p
p
Definition: config.py:33
ProgramInfoType
ProgramInfoType
Definition: programtypes.h:158
ProgramInfo::SetRecordingRuleType
void SetRecordingRuleType(RecordingType type)
Definition: programinfo.h:569
ProgramInfo::GetShortInputName
QString GetShortInputName(void) const
Definition: programinfo.h:460
hardwareprofile.i18n.t
t
Definition: i18n.py:36
operator==
bool operator==(MusicMetadata &a, MusicMetadata &b)
Definition: musicmetadata.cpp:49
ProgramInfo::clear
virtual void clear(void)
Definition: programinfo.cpp:928
ProgramInfo::GetTitle
QString GetTitle(void) const
Definition: programinfo.h:356
ProgramInfo::m_seriesId
QString m_seriesId
Definition: programinfo.h:768
ProgramInfo::GetDescription
QString GetDescription(void) const
Definition: programinfo.h:360
ProgramInfo::SetPlaybackGroup
void SetPlaybackGroup(const QString &group)
Definition: programinfo.h:516
TranscodingStatus
TranscodingStatus
Definition: programtypes.h:121
ProgramInfo::SetRecordingGroup
void SetRecordingGroup(const QString &group)
Definition: programinfo.h:515
ProgramInfo::GetEpisodeTotal
uint GetEpisodeTotal(void) const
Definition: programinfo.h:363
MARK_ALL
@ MARK_ALL
Definition: programtypes.h:49
ProgramInfoUpdater
Definition: programinfoupdater.h:48
ProgramInfo::kLongDescription
@ kLongDescription
Definition: programinfo.h:496
ProgramInfo::GetSourceID
uint GetSourceID(void) const
Definition: programinfo.h:457
ProgramInfo::HasCutlist
bool HasCutlist(void) const
Definition: programinfo.h:474
kProgramInfoTypeVideoDVD
@ kProgramInfoTypeVideoDVD
Definition: programtypes.h:161
GetPlaybackURL
QString GetPlaybackURL(ProgramInfo *pginfo, bool storePath)
Definition: fileserverutil.cpp:45
ProgramInfo::m_sortTitle
QString m_sortTitle
Definition: programinfo.h:741
mythtypes.h
kProgramInfoTypeVideoFile
@ kProgramInfoTypeVideoFile
Definition: programtypes.h:160
FL_NONE
@ FL_NONE
Definition: programtypes.h:132
FL_CHANCOMMFREE
@ FL_CHANCOMMFREE
Definition: programtypes.h:144
clear
static void clear(SettingsMap &cache, SettingsMap &overrides, const QString &myKey)
Definition: mythdb.cpp:846
ProgramInfo::SetRecordingPriority
void SetRecordingPriority(int priority)
Definition: programinfo.h:524
ProgramInfo::ClearMarkupFlag
void ClearMarkupFlag(MarkTypes type) const
Definition: programinfo.h:626
ProgramInfo::MarkupEntry
Definition: programinfo.h:671
ProgramInfo::GetAudioProperties
uint GetAudioProperties(void) const
Definition: programinfo.h:491
f
QTextStream t & f
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:600
ProgramInfo::GetPlaybackGroup
QString GetPlaybackGroup(void) const
Definition: programinfo.h:415
ProgramInfo::GetChannelPlaybackFilters
QString GetChannelPlaybackFilters(void) const
Definition: programinfo.h:382
format_season_and_episode
MPUBLIC QString format_season_and_episode(int seasEp, int digits=-1)
Definition: programinfo.cpp:6101
PMapDBReplacement::lock
QMutex * lock
Definition: programinfo.h:937
FL_PRESERVED
@ FL_PRESERVED
Definition: programtypes.h:143
ProgramInfo::m_originalAirDate
QDate m_originalAirDate
Definition: programinfo.h:781
ProgramInfo::GetFindID
uint GetFindID(void) const
Definition: programinfo.h:465
uint
unsigned int uint
Definition: compat.h:140
ProgramInfo::LoadFromScheduler
static QStringList LoadFromScheduler(const QString &tmptable, int recordid)
Definition: programinfo.cpp:5329
ProgramInfo::GetSeriesID
QString GetSeriesID(void) const
Definition: programinfo.h:430
ProgramInfo::CategoryType
CategoryType
Definition: programinfo.h:72
ProgramInfo::GetStorageGroup
QString GetStorageGroup(void) const
Definition: programinfo.h:417
ProgramInfo::ProgramInfo
ProgramInfo(const QStringList &list)
Definition: programinfo.h:288
ProgramInfo::GetSortSubtitle
QString GetSortSubtitle(void) const
Definition: programinfo.h:359
ProgramInfo::GetOriginalAirDate
QDate GetOriginalAirDate(void) const
Definition: programinfo.h:423
myth_category_type_to_string
MPUBLIC QString myth_category_type_to_string(ProgramInfo::CategoryType category_type)
Definition: programinfo.cpp:129
kAudioPropertyOffset
#define kAudioPropertyOffset
Definition: programtypes.h:179
ProgramInfo::ProgramInfo
ProgramInfo(void)
Null constructor.
Definition: programinfo.h:76
frm_pos_map_t
QMap< long long, long long > frm_pos_map_t
Frame # -> File offset map.
Definition: programtypes.h:46
ProgramInfo::GetVideoProperties
uint GetVideoProperties(void) const
Definition: programinfo.h:489
ProgramInfo::GetScheduledEndTime
QString GetScheduledEndTime(MythDate::Format fmt) const
The scheduled end time of the program (with formatting).
Definition: programinfo.h:394
kSubtitlePropertyOffset
#define kSubtitlePropertyOffset
Definition: programtypes.h:214
ProgramInfo::m_director
QString m_director
Definition: programinfo.h:750
FL_EDITING
@ FL_EDITING
Definition: programtypes.h:136
ProgramInfo::GetDuplicateCheckMethod
RecordingDupMethodType GetDuplicateCheckMethod(void) const
What should be compared to determine if two programs are the same?
Definition: programinfo.h:454
AutoDeleteDeque< ProgramInfo * >
ProgramInfo::GetInputID
uint GetInputID(void) const
Definition: programinfo.h:458
ProgramInfo::m_chanPlaybackFilters
QString m_chanPlaybackFilters
Definition: programinfo.h:758
ProgramInfo::SetChanID
void SetChanID(uint _chanid)
Definition: programinfo.h:510
ProgramInfo::kSchedulingKey
@ kSchedulingKey
Definition: programinfo.h:499
LoadFromProgram
MPUBLIC bool LoadFromProgram(ProgramList &destination, const QString &where, const QString &groupBy, const QString &orderBy, const MSqlBindings &bindings, const ProgramList &schedList)
Definition: programinfo.cpp:5464
ProgramInfo::GetChanID
uint GetChanID(void) const
This is the unique key used in the database to locate tuning information.
Definition: programinfo.h:367
ProgramInfo::GetRecordingRuleType
RecordingType GetRecordingRuleType(void) const
Definition: programinfo.h:446
FL_IGNOREPROGSTART
@ FL_IGNOREPROGSTART
Definition: programtypes.h:149
ProgramInfo::GetEpisode
uint GetEpisode(void) const
Definition: programinfo.h:362
marks
static struct mark marks[16]
ProgramInfo::s_updater
static ProgramInfoUpdater * s_updater
Definition: programinfo.h:826
AutoDeleteDeque::push_back
void push_back(T info)
Definition: autodeletedeque.h:69
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
FL_DELETEPENDING
@ FL_DELETEPENDING
Definition: programtypes.h:140
ProgramInfo::GetProgramInfoType
ProgramInfoType GetProgramInfoType(void) const
Definition: programinfo.h:468
ProgramInfo::m_inetRef
QString m_inetRef
Definition: programinfo.h:770
ProgramInfo::m_subtitle
QString m_subtitle
Definition: programinfo.h:742
ProgramInfo::GetLastModifiedTime
QDateTime GetLastModifiedTime(void) const
Definition: programinfo.h:424
ProgramInfo::GetSeason
uint GetSeason(void) const
Definition: programinfo.h:361
ProgramInfo::IsLocal
bool IsLocal(void) const
Definition: programinfo.h:346
ProgramInfo::SetSourceID
void SetSourceID(uint id)
Definition: programinfo.h:527
ProgramInfo::SetIgnoreBookmark
void SetIgnoreBookmark(bool ignore)
If "ignore" is true GetBookmark() will return 0, otherwise GetBookmark() will return the bookmark pos...
Definition: programinfo.h:546
ProgramInfo::m_syndicatedEpisode
QString m_syndicatedEpisode
Definition: programinfo.h:748
FL_BOOKMARK
@ FL_BOOKMARK
Definition: programtypes.h:137
kNotRecording
@ kNotRecording
Definition: recordingtypes.h:21
MarkTypes
MarkTypes
Definition: programtypes.h:48
ProgramInfo::SetRecordingPriority2
void SetRecordingPriority2(int priority)
Definition: programinfo.h:525
ProgramInfo::IsVideo
bool IsVideo(void) const
Definition: programinfo.h:479
ProgramInfo::m_chanSign
QString m_chanSign
Definition: programinfo.h:756
ProgramInfo::SetPositionMapDBReplacement
void SetPositionMapDBReplacement(PMapDBReplacement *pmap)
Definition: programinfo.h:570
ProgramInfo::IsAutoExpirable
bool IsAutoExpirable(void) const
Definition: programinfo.h:477
ProgramInfo::IsVideoDVD
bool IsVideoDVD(void) const
Definition: programinfo.h:342
ProgramInfo::SetCategoryType
void SetCategoryType(const CategoryType type)
Definition: programinfo.h:523
ProgramInfo::m_chanStr
QString m_chanStr
Definition: programinfo.h:755
ProgramInfo::IsVideoFile
bool IsVideoFile(void) const
Definition: programinfo.h:340
ProgramInfo::SetFlagging
void SetFlagging(bool flagging)
Definition: programinfo.h:539
ProgramInfo::GetDuplicateCheckSource
RecordingDupInType GetDuplicateCheckSource(void) const
Where should we check for duplicates?
Definition: programinfo.h:450
FL_ALLOWLASTPLAYPOS
@ FL_ALLOWLASTPLAYPOS
Definition: programtypes.h:150
FL_COMMFLAG
@ FL_COMMFLAG
Definition: programtypes.h:133
ProgramInfo::m_sortSubtitle
QString m_sortSubtitle
Definition: programinfo.h:743
ProgramInfo::IsDeletePending
bool IsDeletePending(void) const
Definition: programinfo.h:484
FL_CUTLIST
@ FL_CUTLIST
Definition: programtypes.h:134
FL_TYPEMASK
@ FL_TYPEMASK
Definition: programtypes.h:152
AutoExpireType
AutoExpireType
Definition: programtypes.h:235
GetNextRecordingList
MPUBLIC bool GetNextRecordingList(QDateTime &nextRecordingStart, bool *hasConflicts=nullptr, std::vector< ProgramInfo > *list=nullptr)
Definition: programinfo.cpp:6050
ProgramInfo::m_inputName
QString m_inputName
Definition: programinfo.h:807
uint16_t
unsigned short uint16_t
Definition: iso6937tables.h:1
ProgramInfo::SetIgnoreProgStart
void SetIgnoreProgStart(bool ignore)
If "ignore" is true QueryProgStart() will return 0, otherwise QueryProgStart() will return the progst...
Definition: programinfo.h:553
ProgramInfo::GetProgramID
QString GetProgramID(void) const
Definition: programinfo.h:431
ProgramInfo::GetParentRecordingRuleID
uint GetParentRecordingRuleID(void) const
Definition: programinfo.h:445
ProgramInfo::SetRecordingRuleID
void SetRecordingRuleID(uint id)
Definition: programinfo.h:526
ProgramInfo::kCategorySeries
@ kCategorySeries
Definition: programinfo.h:72
musicbrainzngs.caa.hostname
string hostname
Definition: caa.py:17
FL_REPEAT
@ FL_REPEAT
Definition: programtypes.h:145
ProgramInfo::GetRecordingPriority2
int GetRecordingPriority2(void) const
Definition: programinfo.h:436
ProgramInfo::ProgramInfo
ProgramInfo(QStringList::const_iterator &it, const QStringList::const_iterator &end)
Definition: programinfo.h:282
ProgramInfo::GetRecordingRuleID
uint GetRecordingRuleID(void) const
Definition: programinfo.h:444
ProgramInfo::m_programId
QString m_programId
Definition: programinfo.h:769
ProgramInfo::IsRecording
bool IsRecording(void) const
Definition: programinfo.h:480
string_to_myth_category_type
MPUBLIC ProgramInfo::CategoryType string_to_myth_category_type(const QString &type)
Definition: programinfo.cpp:138
ProgramInfo::GetBasename
QString GetBasename(void) const
Definition: programinfo.h:339
ProgramInfo::GetSubtitleType
uint GetSubtitleType(void) const
Definition: programinfo.h:487
ProgramInfo::GetAvailableStatus
AvailableStatusType GetAvailableStatus(void) const
Definition: programinfo.h:814
kVideoPropertyOffset
#define kVideoPropertyOffset
Definition: programtypes.h:200
ProgramInfo::SetReactivated
void SetReactivated(bool reactivate)
Definition: programinfo.h:529
ProgramInfo::GetCategoryType
CategoryType GetCategoryType(void) const
Definition: programinfo.h:433
FL_IGNOREBOOKMARK
@ FL_IGNOREBOOKMARK
Definition: programtypes.h:148
ProgramInfo::IsBookmarkSet
bool IsBookmarkSet(void) const
Definition: programinfo.h:475
PMapDBReplacement::map
QMap< MarkTypes, frm_pos_map_t > map
Definition: programinfo.h:938
ProgramInfo::GetStars
uint GetStars(uint range_max) const
Definition: programinfo.h:438
ProgramInfo::IsCommercialFree
bool IsCommercialFree(void) const
Definition: programinfo.h:473
ProgramInfo::SetStorageGroup
void SetStorageGroup(const QString &group)
Definition: programinfo.h:518
CommFlagStatus
CommFlagStatus
Definition: programtypes.h:84
kVideoPropertyMask
#define kVideoPropertyMask
Definition: programtypes.h:201
ProgramInfo::HasPathname
bool HasPathname(void) const
Definition: programinfo.h:353
AutoDeleteDeque::size
size_t size(void) const
Definition: autodeletedeque.h:67
ProgramInfo::SetAllowLastPlayPos
void SetAllowLastPlayPos(bool allow)
If "ignore" is true QueryLastPlayPos() will return 0, otherwise QueryLastPlayPos() will return the la...
Definition: programinfo.h:561
recStatus.h
pginfo_init_statics
int pginfo_init_statics()
Definition: programinfo.cpp:44
ProgramInfo::GetBookmarkUpdate
QDateTime GetBookmarkUpdate(void) const
Definition: programinfo.h:470
RecordingType
Definition: recordingprofile.cpp:1224
ProgramInfo::kRecordingKey
@ kRecordingKey
Definition: programinfo.h:498
ProgramInfo::GetSubtitle
QString GetSubtitle(void) const
Definition: programinfo.h:358
ProgramInfo::SetRecordingStartTime
void SetRecordingStartTime(const QDateTime &dt)
Definition: programinfo.h:513
ProgramInfo::GetStars
float GetStars(void) const
Definition: programinfo.h:437