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