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