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