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"
17 #include "libmythbase/mythdate.h"
18 #include "libmythbase/mythdbcon.h"
19 #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 static constexpr int8_t 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  void ClearInputName(void) { m_inputName.clear(); }
467 
468  uint GetFindID(void) const { return m_findId; }
469 
470  uint32_t GetProgramFlags(void) const { return m_programFlags; }
471  QString GetProgramFlagNames(void) const;
473  { return (ProgramInfoType)((m_programFlags & FL_TYPEMASK) >> 20); }
474  QDateTime GetBookmarkUpdate(void) const { return m_bookmarkUpdate; }
475  bool IsGeneric(void) const;
476  bool IsInUsePlaying(void) const { return (m_programFlags & FL_INUSEPLAYING) != 0U;}
477  bool IsCommercialFree(void) const { return (m_programFlags & FL_CHANCOMMFREE) != 0U;}
478  bool IsCommercialFlagged(void) const { return (m_programFlags & FL_COMMFLAG) != 0U;}
479  bool HasCutlist(void) const { return (m_programFlags & FL_CUTLIST) != 0U; }
480  bool IsBookmarkSet(void) const { return (m_programFlags & FL_BOOKMARK) != 0U; }
481  bool IsLastPlaySet(void) const { return (m_programFlags & FL_LASTPLAYPOS) != 0U; }
482  bool IsWatched(void) const { return (m_programFlags & FL_WATCHED) != 0U; }
483  bool IsAutoExpirable(void) const { return (m_programFlags & FL_AUTOEXP) != 0U; }
484  bool IsPreserved(void) const { return (m_programFlags & FL_PRESERVED) != 0U; }
485  bool IsVideo(void) const { return (m_programFlags & FL_TYPEMASK) != 0U; }
486  bool IsRecording(void) const { return !IsVideo(); }
487  bool IsRepeat(void) const { return (m_programFlags & FL_REPEAT) != 0U; }
488  bool IsDuplicate(void) const { return (m_programFlags & FL_DUPLICATE) != 0U; }
489  bool IsReactivated(void) const { return (m_programFlags & FL_REACTIVATE) != 0U; }
490  bool IsDeletePending(void) const
491  { return (m_programFlags & FL_DELETEPENDING) != 0U; }
492 
493  uint GetSubtitleType(void) const { return m_subtitleProperties; }
494  QString GetSubtitleTypeNames(void) const;
495  uint GetVideoProperties(void) const { return m_videoProperties; }
496  QString GetVideoPropertyNames(void) const;
497  uint GetAudioProperties(void) const { return m_audioProperties; }
498  QString GetAudioPropertyNames(void) const;
499 
500  static uint SubtitleTypesFromNames(const QString & names);
501  static uint VideoPropertiesFromNames(const QString & names);
502  static uint AudioPropertiesFromNames(const QString & names);
503 
504  void ProgramFlagsFromNames(const QString & names);
505 
507  {
512  };
513  QString toString(Verbosity v = kLongDescription, const QString& sep = ":",
514  const QString& grp = "\"") const;
515 
516  // Quick sets
517  void SetTitle(const QString &t, const QString &st = nullptr);
518  void SetSubtitle(const QString &st, const QString &sst = nullptr);
520  { m_programFlags &= ~FL_TYPEMASK; m_programFlags |= ((uint32_t)t<<20); }
521  void SetPathname(const QString& pn);
522  void SetChanID(uint _chanid) { m_chanId = _chanid; }
523  void SetScheduledStartTime(const QDateTime &dt) { m_startTs = dt; }
524  void SetScheduledEndTime( const QDateTime &dt) { m_endTs = dt; }
525  void SetRecordingStartTime(const QDateTime &dt) { m_recStartTs = dt; }
526  void SetRecordingEndTime( const QDateTime &dt) { m_recEndTs = dt; }
527  void SetRecordingGroup(const QString &group) { m_recGroup = group; }
528  void SetPlaybackGroup( const QString &group) { m_playGroup = group; }
529  void SetHostname( const QString &host) { m_hostname = host; }
530  void SetStorageGroup( const QString &group) { m_storageGroup = group; }
531  virtual void SetFilesize( uint64_t sz);
532  void SetSeriesID( const QString &id) { m_seriesId = id; }
533  void SetProgramID( const QString &id) { m_programId = id; }
534  void SetCategory( const QString &cat) { m_category = cat; }
535  void SetCategoryType( const CategoryType type) { m_catType = type; }
536  void SetRecordingPriority(int priority) { m_recPriority = priority; }
537  void SetRecordingPriority2(int priority) { m_recPriority2 = priority; }
538  void SetRecordingRuleID(uint id) { m_recordId = id; }
539  void SetSourceID(uint id) { m_sourceId = id; }
540  void SetInputID(uint id) { m_inputId = id; }
541  void SetReactivated(bool reactivate)
542  {
543  m_programFlags &= ~FL_REACTIVATE;
544  m_programFlags |= (reactivate) ? FL_REACTIVATE : 0;
545  }
546  void SetEditing(bool editing)
547  {
548  m_programFlags &= ~FL_EDITING;
549  m_programFlags |= (editing) ? FL_EDITING : 0;
550  }
551  void SetFlagging(bool flagging)
552  {
553  m_programFlags &= ~FL_COMMFLAG;
554  m_programFlags |= (flagging) ? FL_COMMFLAG : 0;
555  }
558  void SetIgnoreBookmark(bool ignore)
559  {
560  m_programFlags &= ~FL_IGNOREBOOKMARK;
561  m_programFlags |= (ignore) ? FL_IGNOREBOOKMARK : 0;
562  }
565  void SetIgnoreProgStart(bool ignore)
566  {
567  m_programFlags &= ~FL_IGNOREPROGSTART;
568  m_programFlags |= (ignore) ? FL_IGNOREPROGSTART : 0;
569  }
573  void SetIgnoreLastPlayPos(bool ignore)
574  {
575  m_programFlags &= ~FL_IGNORELASTPLAYPOS;
576  m_programFlags |= (ignore) ? FL_IGNORELASTPLAYPOS : 0;
577  }
578  virtual void SetRecordingID(uint _recordedid)
579  { m_recordedId = _recordedid; }
580  void SetRecordingStatus(RecStatus::Type status) { m_recStatus = status; }
583  { m_positionMapDBReplacement = pmap; }
584 
585  void CalculateRecordedProgress();
586  uint GetRecordedPercent() const { return m_recordedPercent; }
587  void CalculateWatchedProgress(uint64_t pos);
588  uint GetWatchedPercent() const { return m_watchedPercent; }
589  void SetWatchedPercent(uint progress) { m_watchedPercent = progress; }
590  void CalculateProgress(uint64_t pos);
591 
592  // Slow DB gets
593  QString QueryBasename(void) const;
594 // uint64_t QueryFilesize(void) const; // TODO Remove
595  uint QueryMplexID(void) const;
596  QDateTime QueryBookmarkTimeStamp(void) const;
597  uint64_t QueryBookmark(void) const;
598  uint64_t QueryProgStart(void) const;
599  uint64_t QueryLastPlayPos(void) const;
600  uint64_t QueryStartMark(void) const;
601  CategoryType QueryCategoryType(void) const;
602  QStringList QueryDVDBookmark(const QString &serialid) const;
603  QStringList QueryBDBookmark(const QString &serialid) const;
604  bool QueryIsEditing(void) const;
605  bool QueryIsInUse(QStringList &byWho) const;
606  bool QueryIsInUse(QString &byWho) const;
607  bool QueryIsDeleteCandidate(bool one_playback_allowed = false) const;
608  AutoExpireType QueryAutoExpire(void) const;
609  TranscodingStatus QueryTranscodeStatus(void) const;
610  bool QueryTuningInfo(QString &channum, QString &input) const;
611  QString QueryInputDisplayName(void) const;
612  uint QueryAverageWidth(void) const;
613  uint QueryAverageHeight(void) const;
614  uint QueryAverageFrameRate(void) const;
615  MarkTypes QueryAverageAspectRatio(void) const;
616  bool QueryAverageScanProgressive(void) const;
617  std::chrono::milliseconds QueryTotalDuration(void) const;
618  int64_t QueryTotalFrames(void) const;
619  QString QueryRecordingGroup(void) const;
620  bool QueryMarkupFlag(MarkTypes type) const;
621  uint QueryTranscoderID(void) const;
622  uint64_t QueryLastFrameInPosMap(void) const;
623  bool Reload(void);
624 
625  // Slow DB sets
626  virtual void SaveFilesize(uint64_t fsize);
627  void SaveLastPlayPos(uint64_t frame);
628  void SaveBookmark(uint64_t frame);
629  static void SaveDVDBookmark(const QStringList &fields) ;
630  static void SaveBDBookmark(const QStringList &fields) ;
631  void SaveEditing(bool edit);
632  void SaveTranscodeStatus(TranscodingStatus trans);
633  void SaveWatched(bool watchedFlag);
634  void SaveDeletePendingFlag(bool deleteFlag);
635  void SaveCommFlagged(CommFlagStatus flag); // 1 = flagged, 2 = processing
636  void SaveAutoExpire(AutoExpireType autoExpire, bool updateDelete = false);
637  void SavePreserve(bool preserveEpisode);
638  bool SaveBasename(const QString &basename);
639  void SaveAspect(uint64_t frame, MarkTypes type, uint customAspect);
640  void SaveResolution(uint64_t frame, uint width, uint height);
641  void SaveFrameRate(uint64_t frame, uint framerate);
642  void SaveVideoScanType(uint64_t frame, bool progressive);
643  void SaveTotalDuration(std::chrono::milliseconds duration);
644  void SaveTotalFrames(int64_t frames);
645  void SaveVideoProperties(uint mask, uint video_property_flags);
646  void SaveMarkupFlag(MarkTypes type) const;
647  void ClearMarkupFlag(MarkTypes type) const { ClearMarkupMap(type); }
648  void UpdateLastDelete(bool setTime) const;
649  void MarkAsInUse(bool inuse, const QString& usedFor = "");
650  void UpdateInUseMark(bool force = false);
651  void SaveSeasonEpisode(uint seas, uint ep);
652  void SaveInetRef(const QString &inet);
653 
654  // Extremely slow functions that cannot be called from the UI thread.
655  QString DiscoverRecordingDirectory(void);
656  QString GetPlaybackURL(bool checkMaster = false,
657  bool forceCheckLocal = false);
658  ProgramInfoType DiscoverProgramInfoType(void) const;
659 
660  // Edit flagging map
661  bool QueryCutList(frm_dir_map_t &delMap, bool loadAutosave=false) const;
662  void SaveCutList(frm_dir_map_t &delMap, bool isAutoSave=false) const;
663 
664  // Commercial flagging map
665  void QueryCommBreakList(frm_dir_map_t &frames) const;
666  void SaveCommBreakList(frm_dir_map_t &frames) const;
667 
668  // Keyframe positions map
669  void QueryPositionMap(frm_pos_map_t &posMap, MarkTypes type) const;
670  void ClearPositionMap(MarkTypes type) const;
671  void SavePositionMap(frm_pos_map_t &posMap, MarkTypes type,
672  int64_t min_frame = -1, int64_t max_frame = -1) const;
673  void SavePositionMapDelta(frm_pos_map_t &posMap, MarkTypes type) const;
674 
675  // Get position/duration for keyframe and vice versa
676  bool QueryKeyFrameInfo(uint64_t *result, uint64_t position_or_keyframe,
677  bool backwards,
678  MarkTypes type, const char *from_filemarkup_asc,
679  const char *from_filemarkup_desc,
680  const char *from_recordedseek_asc,
681  const char *from_recordedseek_desc) const;
682  bool QueryKeyFramePosition(uint64_t *position, uint64_t keyframe,
683  bool backwards) const;
684  bool QueryPositionKeyFrame(uint64_t *keyframe, uint64_t position,
685  bool backwards) const;
686  bool QueryKeyFrameDuration(uint64_t *duration, uint64_t keyframe,
687  bool backwards) const;
688  bool QueryDurationKeyFrame(uint64_t *keyframe, uint64_t duration,
689  bool backwards) const;
690 
691  // Get/set all markup
692  struct MarkupEntry
693  {
694  int type { -1 }; // MarkTypes
695  uint64_t frame { 0 };
696  uint64_t data { 0 };
697  bool isDataNull { true };
698  MarkupEntry(int t, uint64_t f, uint64_t d, bool n)
699  : type(t), frame(f), data(d), isDataNull(n) {}
700  MarkupEntry(void) = default;
701  };
702  void QueryMarkup(QVector<MarkupEntry> &mapMark,
703  QVector<MarkupEntry> &mapSeek) const;
704  void SaveMarkup(const QVector<MarkupEntry> &mapMark,
705  const QVector<MarkupEntry> &mapSeek) const;
706 
708  void SendUpdateEvent(void) const;
710  void SendAddedEvent(void) const;
712  void SendDeletedEvent(void) const;
713 
715  static QString i18n(const QString &msg);
716 
717  static QString MakeUniqueKey(uint chanid, const QDateTime &recstartts);
718  static bool ExtractKey(const QString &uniquekey,
719  uint &chanid, QDateTime &recstartts);
720  static bool ExtractKeyFromPathname(
721  const QString &pathname, uint &chanid, QDateTime &recstartts);
722  static bool QueryKeyFromPathname(
723  const QString &pathname, uint &chanid, QDateTime &recstartts);
724  static bool QueryRecordedIdFromPathname(const QString &pathname,
725  uint &recordedid);
726 
727  static QString QueryRecordingGroupPassword(const QString &group);
728  static uint64_t QueryBookmark(uint chanid, const QDateTime &recstartts);
729  static QMap<QString,uint32_t> QueryInUseMap(void);
730  static QMap<QString,bool> QueryJobsRunning(int type);
731  static QStringList LoadFromScheduler(const QString &tmptable, int recordid);
732 
733  // Flagging map support methods
734  void UpdateMarkTimeStamp(bool bookmarked) const;
735  void UpdateLastPlayTimeStamp(bool lastplay) const;
736  void QueryMarkupMap(frm_dir_map_t&marks, MarkTypes type,
737  bool merge = false) const;
738  void SaveMarkupMap(const frm_dir_map_t &marks, MarkTypes type = MARK_ALL,
739  int64_t min_frame = -1, int64_t max_frame = -1) const;
740  void ClearMarkupMap(MarkTypes type = MARK_ALL,
741  int64_t min_frame = -1, int64_t max_frame = -1) const;
742 
743  protected:
744  // Creates a basename from the start and end times
745  QString CreateRecordBasename(const QString &ext) const;
746 
747  bool LoadProgramFromRecorded(
748  uint chanid, const QDateTime &recstartts);
749 
750  bool FromStringList(QStringList::const_iterator &it,
751  const QStringList::const_iterator& end);
752 
753  static void QueryMarkupMap(
754  const QString &video_pathname,
755  frm_dir_map_t &marks, MarkTypes type, bool merge = false);
756  static void QueryMarkupMap(
757  uint chanid, const QDateTime &recstartts,
758  frm_dir_map_t &marks, MarkTypes type, bool merge = false);
759 
760  static int InitStatics(void);
761 
762  protected:
763  QString m_title;
764  QString m_sortTitle;
765  QString m_subtitle;
766  QString m_sortSubtitle;
767  QString m_description;
768  uint m_season {0};
769  uint m_episode {0};
770  uint m_totalEpisodes {0};
772  QString m_category;
773  QString m_director;
774 
775  int32_t m_recPriority {0};
776 
777  uint32_t m_chanId {0};
778  QString m_chanStr; // Channum
779  QString m_chanSign; // Callsign
780  QString m_chanName;
782 
783  QString m_recGroup {"Default"};
784  QString m_playGroup {"Default"};
785 
786  mutable QString m_pathname;
787 
788  QString m_hostname;
789  QString m_storageGroup {"Default"};
790 
791  QString m_seriesId;
792  QString m_programId;
793  QString m_inetRef;
794  CategoryType m_catType {kCategoryNone};
795 
796  uint64_t m_fileSize {0ULL};
797 
798  QDateTime m_startTs {MythDate::current(true)};
799  QDateTime m_endTs {m_startTs};
800  QDateTime m_recStartTs {m_startTs};
801  QDateTime m_recEndTs {m_startTs};
802 
803  float m_stars {0.0F};
805  QDateTime m_lastModified {m_startTs};
806  static constexpr int64_t kLastInUseOffset {4LL * 60 * 60};
807  QDateTime m_lastInUseTime {m_startTs.addSecs(-kLastInUseOffset)};
808 
809  int32_t m_recPriority2 {0};
810 
811  uint32_t m_recordId {0};
812  uint32_t m_parentId {0};
813 
814  uint32_t m_sourceId {0};
815  uint32_t m_inputId {0};
816  uint32_t m_findId {0};
817 
818  uint32_t m_programFlags {FL_NONE};
819  VideoPropsType m_videoProperties {VID_UNKNOWN};
820  AudioPropsType m_audioProperties {AUD_UNKNOWN};
821  SubtitlePropsType m_subtitleProperties {SUB_UNKNOWN};
822  uint16_t m_year {0};
823  uint16_t m_partNumber {0};
824  uint16_t m_partTotal {0};
825 
826  int8_t m_recStatus {RecStatus::Unknown};
827  uint8_t m_recType {kNotRecording};
828  uint8_t m_dupIn {kDupsInAll};
829  uint8_t m_dupMethod {kDupCheckSubThenDesc};
830 
831  uint m_recordedId {0};
832  QString m_inputName;
833  QDateTime m_bookmarkUpdate;
834 
835 // everything below this line is not serialized
836  uint8_t m_availableStatus {asAvailable}; // only used for playbackbox.cpp
837  int8_t m_recordedPercent {-1}; // only used by UI
838  int8_t m_watchedPercent {-1}; // only used by UI
839 
840  public:
841  void SetAvailableStatus(AvailableStatusType status, const QString &where);
843  { return (AvailableStatusType) m_availableStatus; }
844  int8_t m_spread {-1}; // only used in guidegrid.cpp
845  int8_t m_startCol {-1}; // only used in guidegrid.cpp
846 
847  static const QString kFromRecordedQuery;
848 
849  protected:
850  QString m_inUseForWhat;
851  PMapDBReplacement *m_positionMapDBReplacement {nullptr};
852 
853  static QMutex s_staticDataLock;
855  static bool s_usingProgIDAuth;
856 
857  public:
858  QDateTime m_previewUpdate;
859 };
860 
862  ProgramList &destination,
863  const QString &where,
864  const QString &groupBy,
865  const QString &orderBy,
866  const MSqlBindings &bindings,
867  const ProgramList &schedList);
868 
870  ProgramList &destination,
871  const QString &sql,
872  const MSqlBindings &bindings,
873  const ProgramList &schedList);
874 
876  ProgramList &destination,
877  const QString &sql,
878  const MSqlBindings &bindings,
879  const ProgramList &schedList,
880  uint start,
881  uint limit,
882  uint &count);
883 
885  uint chanid, const QDateTime &starttime);
886 
888  ProgramList &destination,
889  const QString &sql,
890  const MSqlBindings &bindings);
891 
893  ProgramList &destination,
894  const QString &sql,
895  const MSqlBindings &bindings,
896  uint start,
897  uint limit,
898  uint &count);
899 
901  ProgramList &destination,
902  bool possiblyInProgressRecordingsOnly,
903  const QMap<QString,uint32_t> &inUseMap,
904  const QMap<QString,bool> &isJobRunning,
905  const QMap<QString, ProgramInfo*> &recMap,
906  int sort = 0,
907  const QString &sortBy = "",
908  bool ignoreLiveTV = false,
909  bool ignoreDeleted = false);
910 
911 template<typename TYPE>
913  AutoDeleteDeque<TYPE*> &destination,
914  bool &hasConflicts,
915  const QString& altTable = "",
916  int recordid = -1)
917 {
918  destination.clear();
919  hasConflicts = false;
920 
921  QStringList slist = ProgramInfo::LoadFromScheduler(altTable, recordid);
922  if (slist.empty())
923  return false;
924 
925  hasConflicts = slist[0].toInt();
926 
927  QStringList::const_iterator sit = slist.cbegin()+2;
928  while (sit != slist.cend())
929  {
930  TYPE *p = new TYPE(sit, slist.cend());
931  destination.push_back(p);
932 
933  if (!p->HasPathname() && !p->GetChanID())
934  {
935  delete p;
936  destination.clear();
937  return false;
938  }
939  }
940 
941  if (destination.size() != slist[1].toUInt())
942  {
943  destination.clear();
944  return false;
945  }
946 
947  return true;
948 }
949 
950 template<typename T>
952 {
953  bool dummyConflicts = false;
954  return LoadFromScheduler(destination, dummyConflicts, "", -1);
955 }
956 
957 // Moved from programdetails.cpp/h, used by MythWelcome/MythShutdown
958 // could be factored out
959 MPUBLIC bool GetNextRecordingList(QDateTime &nextRecordingStart,
960  bool *hasConflicts = nullptr,
961  std::vector<ProgramInfo> *list = nullptr);
962 
963 class QMutex;
965 {
966  public:
969  QMutex *lock;
970  QMap<MarkTypes,frm_pos_map_t> map;
971 };
972 
975 
978 
979 #endif // MYTHPROGRAM_H_
980 
981 /* vim: set expandtab tabstop=4 shiftwidth=4: */
ProgramInfo::SetProgramInfoType
void SetProgramInfoType(ProgramInfoType t)
Definition: programinfo.h:519
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:101
RecStatus::Type
Type
Definition: recordingstatus.h:16
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:128
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:488
ProgramInfo::m_title
QString m_title
Definition: programinfo.h:763
LoadFromScheduler
bool LoadFromScheduler(AutoDeleteDeque< TYPE * > &destination, bool &hasConflicts, const QString &altTable="", int recordid=-1)
Definition: programinfo.h:912
ProgramInfo::SetRecordingStatus
void SetRecordingStatus(RecStatus::Type status)
Definition: programinfo.h:580
ProgramInfo::GetHostname
QString GetHostname(void) const
Definition: programinfo.h:421
ProgramInfo::Verbosity
Verbosity
Definition: programinfo.h:506
ProgramInfo::m_inUseForWhat
QString m_inUseForWhat
Definition: programinfo.h:850
ProgramInfo::ClearInputName
void ClearInputName(void)
Definition: programinfo.h:466
ProgramInfo::GetInputName
QString GetInputName(void) const
Definition: programinfo.h:464
ProgramInfo::m_chanId
uint32_t m_chanId
Definition: programinfo.h:777
ProgramInfo::SetCategory
void SetCategory(const QString &cat)
Definition: programinfo.h:534
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:800
ProgramInfo::SetRecordingID
virtual void SetRecordingID(uint _recordedid)
Definition: programinfo.h:578
kDupCheckSubThenDesc
@ kDupCheckSubThenDesc
Definition: recordingtypes.h:69
ProgramInfo::m_description
QString m_description
Definition: programinfo.h:767
asAvailable
@ asAvailable
Definition: programtypes.h:178
progress
bool progress
Definition: mythcommflag.cpp:69
ProgramInfo::s_staticDataLock
static QMutex s_staticDataLock
Definition: programinfo.h:853
ProgramInfo::m_previewUpdate
QDateTime m_previewUpdate
Definition: programinfo.h:858
ProgramInfo::MarkupEntry::MarkupEntry
MarkupEntry(int t, uint64_t f, uint64_t d, bool n)
Definition: programinfo.h:698
ProgramInfo::SetWatchedPercent
void SetWatchedPercent(uint progress)
Definition: programinfo.h:589
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:964
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:532
AutoDeleteDeque::clear
void clear(void)
Definition: autodeletedeque.h:40
recordingstatus.h
ProgramInfo::kTitleSubtitle
@ kTitleSubtitle
Definition: programinfo.h:509
LoadProgramFromProgram
MPUBLIC ProgramInfo * LoadProgramFromProgram(uint chanid, const QDateTime &starttime)
Definition: programinfo.cpp:5794
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: recordingstatus.h:32
RecordingDupMethodType
RecordingDupMethodType
Definition: recordingtypes.h:62
ProgramInfo::SetEditing
void SetEditing(bool editing)
Definition: programinfo.h:546
ProgramInfo::s_usingProgIDAuth
static bool s_usingProgIDAuth
Definition: programinfo.h:855
ProgramInfo::SetHostname
void SetHostname(const QString &host)
Definition: programinfo.h:529
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:523
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:489
ProgramInfo::IsInUsePlaying
bool IsInUsePlaying(void) const
Definition: programinfo.h:476
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:833
NUMPROGRAMLINES
static constexpr int8_t NUMPROGRAMLINES
Definition: programinfo.h:28
ProgramInfo::SetProgramID
void SetProgramID(const QString &id)
Definition: programinfo.h:533
ProgramInfo::m_pathname
QString m_pathname
Definition: programinfo.h:786
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:470
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:481
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:5996
LoadFromOldRecorded
MPUBLIC bool LoadFromOldRecorded(ProgramList &destination, const QString &sql, const MSqlBindings &bindings)
Definition: programinfo.cpp:5830
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:14
kDupsInAll
@ kDupsInAll
Definition: recordingtypes.h:50
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:482
programtypes.h
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
ProgramInfo::IsPreserved
bool IsPreserved(void) const
Definition: programinfo.h:484
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:487
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:45
ProgramInfo::m_hostname
QString m_hostname
Definition: programinfo.h:788
ProgramInfo::kFromRecordedQuery
static const QString kFromRecordedQuery
Definition: programinfo.h:847
ProgramInfo::GetLastModifiedTime
QString GetLastModifiedTime(MythDate::Format fmt) const
Definition: programinfo.h:430
ProgramInfo::IsVideoBD
bool IsVideoBD(void) const
Definition: programinfo.h:349
ProgramInfo::m_chanName
QString m_chanName
Definition: programinfo.h:780
mythdate.h
ProgramInfo::SetRecordingEndTime
void SetRecordingEndTime(const QDateTime &dt)
Definition: programinfo.h:526
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:772
ProgramInfo::SetScheduledEndTime
void SetScheduledEndTime(const QDateTime &dt)
Definition: programinfo.h:524
ProgramInfo::SetInputID
void SetInputID(uint id)
Definition: programinfo.h:540
hardwareprofile.config.p
p
Definition: config.py:33
ProgramInfoType
ProgramInfoType
Definition: programtypes.h:168
ProgramInfo::SetRecordingRuleType
void SetRecordingRuleType(RecordingType type)
Definition: programinfo.h:581
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:932
ProgramInfo::GetTitle
QString GetTitle(void) const
Definition: programinfo.h:361
ProgramInfo::m_seriesId
QString m_seriesId
Definition: programinfo.h:791
ProgramInfo::GetDescription
QString GetDescription(void) const
Definition: programinfo.h:365
ProgramInfo::SetPlaybackGroup
void SetPlaybackGroup(const QString &group)
Definition: programinfo.h:528
TranscodingStatus
TranscodingStatus
Definition: programtypes.h:158
ProgramInfo::SetRecordingGroup
void SetRecordingGroup(const QString &group)
Definition: programinfo.h:527
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:508
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:573
ProgramInfo::HasCutlist
bool HasCutlist(void) const
Definition: programinfo.h:479
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:764
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:536
ProgramInfo::ClearMarkupFlag
void ClearMarkupFlag(MarkTypes type) const
Definition: programinfo.h:647
ProgramInfo::MarkupEntry
Definition: programinfo.h:692
ProgramInfo::GetAudioProperties
uint GetAudioProperties(void) const
Definition: programinfo.h:497
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:969
ProgramInfo::m_originalAirDate
QDate m_originalAirDate
Definition: programinfo.h:804
ProgramInfo::GetFindID
uint GetFindID(void) const
Definition: programinfo.h:468
uint
unsigned int uint
Definition: compat.h:79
ProgramInfo::LoadFromScheduler
static QStringList LoadFromScheduler(const QString &tmptable, int recordid)
Definition: programinfo.cpp:5507
ProgramInfo::GetSeriesID
QString GetSeriesID(void) const
Definition: programinfo.h:435
ProgramInfo::GetRecordedPercent
uint GetRecordedPercent() const
Definition: programinfo.h:586
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:128
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:495
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:773
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:781
ProgramInfo::SetChanID
void SetChanID(uint _chanid)
Definition: programinfo.h:522
ProgramInfo::kSchedulingKey
@ kSchedulingKey
Definition: programinfo.h:511
LoadFromProgram
MPUBLIC bool LoadFromProgram(ProgramList &destination, const QString &where, const QString &groupBy, const QString &orderBy, const MSqlBindings &bindings, const ProgramList &schedList)
Definition: programinfo.cpp:5642
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:854
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:472
ProgramInfo::m_inetRef
QString m_inetRef
Definition: programinfo.h:793
ProgramInfo::m_subtitle
QString m_subtitle
Definition: programinfo.h:765
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:539
ProgramInfo::SetIgnoreBookmark
void SetIgnoreBookmark(bool ignore)
If "ignore" is true GetBookmark() will return 0, otherwise GetBookmark() will return the bookmark pos...
Definition: programinfo.h:558
ProgramInfo::IsCommercialFlagged
bool IsCommercialFlagged(void) const
Definition: programinfo.h:478
ProgramInfo::m_syndicatedEpisode
QString m_syndicatedEpisode
Definition: programinfo.h:771
kNotRecording
@ kNotRecording
Definition: recordingtypes.h:22
std
Definition: mythchrono.h:23
MarkTypes
MarkTypes
Definition: programtypes.h:48
ProgramInfo::SetRecordingPriority2
void SetRecordingPriority2(int priority)
Definition: programinfo.h:537
ProgramInfo::IsVideo
bool IsVideo(void) const
Definition: programinfo.h:485
ProgramInfo::m_chanSign
QString m_chanSign
Definition: programinfo.h:779
ProgramInfo::SetPositionMapDBReplacement
void SetPositionMapDBReplacement(PMapDBReplacement *pmap)
Definition: programinfo.h:582
ProgramInfo::IsAutoExpirable
bool IsAutoExpirable(void) const
Definition: programinfo.h:483
ProgramInfo::IsVideoDVD
bool IsVideoDVD(void) const
Definition: programinfo.h:347
ProgramInfo::SetCategoryType
void SetCategoryType(const CategoryType type)
Definition: programinfo.h:535
ProgramInfo::m_chanStr
QString m_chanStr
Definition: programinfo.h:778
marks
static const std::array< const mark, 16 > marks
Definition: lang.cpp:23
ProgramInfo::IsVideoFile
bool IsVideoFile(void) const
Definition: programinfo.h:345
ProgramInfo::SetFlagging
void SetFlagging(bool flagging)
Definition: programinfo.h:551
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:766
ProgramInfo::IsDeletePending
bool IsDeletePending(void) const
Definition: programinfo.h:490
ProgramInfo::GetWatchedPercent
uint GetWatchedPercent() const
Definition: programinfo.h:588
AutoExpireType
AutoExpireType
Definition: programtypes.h:194
GetNextRecordingList
MPUBLIC bool GetNextRecordingList(QDateTime &nextRecordingStart, bool *hasConflicts=nullptr, std::vector< ProgramInfo > *list=nullptr)
Definition: programinfo.cpp:6249
ProgramInfo::m_inputName
QString m_inputName
Definition: programinfo.h:832
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:565
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:538
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:792
ProgramInfo::IsRecording
bool IsRecording(void) const
Definition: programinfo.h:486
string_to_myth_category_type
MPUBLIC ProgramInfo::CategoryType string_to_myth_category_type(const QString &type)
Definition: programinfo.cpp:137
ProgramInfo::GetBasename
QString GetBasename(void) const
Definition: programinfo.h:344
ProgramInfo::GetSubtitleType
uint GetSubtitleType(void) const
Definition: programinfo.h:493
ProgramInfo::GetAvailableStatus
AvailableStatusType GetAvailableStatus(void) const
Definition: programinfo.h:842
ProgramInfo::SetReactivated
void SetReactivated(bool reactivate)
Definition: programinfo.h:541
ProgramInfo::GetCategoryType
CategoryType GetCategoryType(void) const
Definition: programinfo.h:438
ProgramInfo::IsBookmarkSet
bool IsBookmarkSet(void) const
Definition: programinfo.h:480
RecordingType
RecordingType
Definition: recordingtypes.h:20
PMapDBReplacement::map
QMap< MarkTypes, frm_pos_map_t > map
Definition: programinfo.h:970
ProgramInfo::GetStars
uint GetStars(uint range_max) const
Definition: programinfo.h:443
ProgramInfo::IsCommercialFree
bool IsCommercialFree(void) const
Definition: programinfo.h:477
ProgramInfo::SetStorageGroup
void SetStorageGroup(const QString &group)
Definition: programinfo.h:530
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
pginfo_init_statics
int pginfo_init_statics()
Definition: programinfo.cpp:39
ProgramInfo::GetBookmarkUpdate
QDateTime GetBookmarkUpdate(void) const
Definition: programinfo.h:474
ProgramInfo::kRecordingKey
@ kRecordingKey
Definition: programinfo.h:510
ProgramInfo::GetSubtitle
QString GetSubtitle(void) const
Definition: programinfo.h:363
ProgramInfo::SetRecordingStartTime
void SetRecordingStartTime(const QDateTime &dt)
Definition: programinfo.h:525
ProgramInfo::GetStars
float GetStars(void) const
Definition: programinfo.h:442