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  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  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  std::chrono::minutes 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,
314  uint date_format = 0) const;
315  virtual void SubstituteMatches(QString &str);
316 
317  // Used for scheduling recordings
318  bool IsSameProgram(const ProgramInfo &other) const; // Exact same program
319  bool IsDuplicateProgram(const ProgramInfo &other) const; // Is this program considered a duplicate according to rule type and dup method (scheduler only)
320  bool IsSameProgramAndStartTime(const ProgramInfo &other) const; // Exact same program and same starttime, Any channel
321  bool IsSameTitleStartTimeAndChannel(const ProgramInfo &other) const; // Same title, starttime and channel
322  bool IsSameTitleTimeslotAndChannel(const ProgramInfo &other) const;//sched only - Same title, starttime, endtime and channel
323  static bool UsingProgramIDAuthority(void)
324  {
325  return s_usingProgIDAuth;
326  };
327  static void CheckProgramIDAuthorities(void);//sched only
328 
329  // Used for extending scheduled recordings
330  bool IsSameProgramWeakCheck(const ProgramInfo &other) const;
331  bool IsSameRecording(const ProgramInfo &other) const
332  { return m_chanId == other.m_chanId && m_recStartTs == other.m_recStartTs; }
333  bool IsSameChannel(const ProgramInfo &other) const;
334 
335  // Quick gets
338  QString MakeUniqueKey(void) const
339  { return MakeUniqueKey(m_chanId, m_recStartTs); }
340  std::chrono::seconds GetSecondsInRecording(void) const;
341  QString ChannelText(const QString& format) const;
342  QString GetPathname(void) const { return m_pathname; }
343  QString GetBasename(void) const { return m_pathname.section('/', -1); }
344  bool IsVideoFile(void) const
345  { return GetProgramInfoType() == kProgramInfoTypeVideoFile; }
346  bool IsVideoDVD(void) const
347  { return GetProgramInfoType() == kProgramInfoTypeVideoDVD; }
348  bool IsVideoBD(void) const
349  { return GetProgramInfoType() == kProgramInfoTypeVideoBD; }
350  bool IsLocal(void) const { return m_pathname.startsWith("/")
351 #ifdef _WIN32
352  || m_pathname.at(1) == ':'
353 #endif
354  ; }
355  bool IsMythStream(void) const { return m_pathname.startsWith("myth://"); }
356  bool IsPathSet(void) const { return GetBasename() != m_pathname; }
357  bool HasPathname(void) const { return !GetPathname().isEmpty(); }
358  bool IsFileReadable(void);
359 
360  QString GetTitle(void) const { return m_title; }
361  QString GetSortTitle(void) const { return m_sortTitle; }
362  QString GetSubtitle(void) const { return m_subtitle; }
363  QString GetSortSubtitle(void) const { return m_sortSubtitle; }
364  QString GetDescription(void) const { return m_description; }
365  uint GetSeason(void) const { return m_season; }
366  uint GetEpisode(void) const { return m_episode; }
367  uint GetEpisodeTotal(void) const { return m_totalEpisodes; }
368  QString GetCategory(void) const { return m_category; }
371  uint GetChanID(void) const { return m_chanId; }
375  QString GetChanNum(void) const { return m_chanStr; }
382  QString GetChannelSchedulingID(void) const { return m_chanSign; }
385  QString GetChannelName(void) const { return m_chanName; }
386  QString GetChannelPlaybackFilters(void) const
387  { return m_chanPlaybackFilters; }
389  QDateTime GetScheduledStartTime(void) const { return m_startTs; }
392  {
393  return MythDate::toString(m_startTs, fmt);
394  }
396  QDateTime GetScheduledEndTime(void) const { return m_endTs; }
399  {
400  return MythDate::toString(m_endTs, fmt);
401  }
403  QDateTime GetRecordingStartTime(void) const { return m_recStartTs; }
406  {
407  return MythDate::toString(m_recStartTs, fmt);
408  }
411  QDateTime GetRecordingEndTime(void) const { return m_recEndTs; }
415  {
416  return MythDate::toString(m_recEndTs, fmt);
417  }
418  QString GetRecordingGroup(void) const { return m_recGroup; }
419  QString GetPlaybackGroup(void) const { return m_playGroup; }
420  QString GetHostname(void) const { return m_hostname; }
421  QString GetStorageGroup(void) const { return m_storageGroup; }
423  {
424  return ((m_year) ? m_year :
425  (m_originalAirDate.isValid()) ? m_originalAirDate.year() : 0);
426  }
427  QDate GetOriginalAirDate(void) const { return m_originalAirDate; }
428  QDateTime GetLastModifiedTime(void) const { return m_lastModified; }
430  {
431  return MythDate::toString(m_lastModified, fmt);
432  }
433  virtual uint64_t GetFilesize(void) const; // TODO Remove
434  QString GetSeriesID(void) const { return m_seriesId; }
435  QString GetProgramID(void) const { return m_programId; }
436  QString GetInetRef(void) const { return m_inetRef; }
437  CategoryType GetCategoryType(void) const { return m_catType; }
438  QString GetCategoryTypeString(void) const;
439  int GetRecordingPriority(void) const { return m_recPriority; }
440  int GetRecordingPriority2(void) const { return m_recPriority2; }
441  float GetStars(void) const { return m_stars; }
442  uint GetStars(uint range_max) const
443  { return lroundf(m_stars * range_max); }
444 
445  uint GetRecordingID(void) const { return m_recordedId; }
447  { return (RecStatus::Type)m_recStatus; }
448  uint GetRecordingRuleID(void) const { return m_recordId; }
449  uint GetParentRecordingRuleID(void) const { return m_parentId; }
451  { return (RecordingType)m_recType; }
452 
455  { return (RecordingDupInType)m_dupIn; }
456 
459  { return (RecordingDupMethodType)m_dupMethod; }
460 
461  uint GetSourceID(void) const { return m_sourceId; }
462  uint GetInputID(void) const { return m_inputId; }
463  QString GetInputName(void) const { return m_inputName; }
464  QString GetShortInputName(void) const
465  { return m_inputName.isRightToLeft() ?
466  m_inputName.left(2) : m_inputName.right(2); }
467  void ClearInputName(void) { m_inputName.clear(); }
468 
469  uint GetFindID(void) const { return m_findId; }
470 
471  uint32_t GetProgramFlags(void) const { return m_programFlags; }
472  QString GetProgramFlagNames(void) const;
474  { return (ProgramInfoType)((m_programFlags & FL_TYPEMASK) >> 20); }
475  QDateTime GetBookmarkUpdate(void) const { return m_bookmarkUpdate; }
476  bool IsGeneric(void) const;
477  bool IsInUsePlaying(void) const { return (m_programFlags & FL_INUSEPLAYING) != 0U;}
478  bool IsCommercialFree(void) const { return (m_programFlags & FL_CHANCOMMFREE) != 0U;}
479  bool IsCommercialFlagged(void) const { return (m_programFlags & FL_COMMFLAG) != 0U;}
480  bool HasCutlist(void) const { return (m_programFlags & FL_CUTLIST) != 0U; }
481  bool IsBookmarkSet(void) const { return (m_programFlags & FL_BOOKMARK) != 0U; }
482  bool IsWatched(void) const { return (m_programFlags & FL_WATCHED) != 0U; }
483  bool IsAutoExpirable(void) const { return (m_programFlags & FL_AUTOEXP) != 0U; }
484  bool IsPreserved(void) const { return (m_programFlags & FL_PRESERVED) != 0U; }
485  bool IsVideo(void) const { return (m_programFlags & FL_TYPEMASK) != 0U; }
486  bool IsRecording(void) const { return !IsVideo(); }
487  bool IsRepeat(void) const { return (m_programFlags & FL_REPEAT) != 0U; }
488  bool IsDuplicate(void) const { return (m_programFlags & FL_DUPLICATE) != 0U; }
489  bool IsReactivated(void) const { return (m_programFlags & FL_REACTIVATE) != 0U; }
490  bool IsDeletePending(void) const
491  { return (m_programFlags & FL_DELETEPENDING) != 0U; }
492 
493  uint GetSubtitleType(void) const { return m_subtitleProperties; }
494  QString GetSubtitleTypeNames(void) const;
495  uint GetVideoProperties(void) const { return m_videoProperties; }
496  QString GetVideoPropertyNames(void) const;
497  uint GetAudioProperties(void) const { return m_audioProperties; }
498  QString GetAudioPropertyNames(void) const;
499 
500  static uint SubtitleTypesFromNames(const QString & names);
501  static uint VideoPropertiesFromNames(const QString & names);
502  static uint AudioPropertiesFromNames(const QString & names);
503 
504  void ProgramFlagsFromNames(const QString & names);
505 
507  {
512  };
513  QString toString(Verbosity v = kLongDescription, const QString& sep = ":",
514  const QString& grp = "\"") const;
515 
516  // Quick sets
517  void SetTitle(const QString &t, const QString &st = nullptr);
518  void SetSubtitle(const QString &st, const QString &sst = nullptr);
520  { m_programFlags &= ~FL_TYPEMASK; m_programFlags |= ((uint32_t)t<<20); }
521  void SetPathname(const QString& pn);
522  void SetChanID(uint _chanid) { m_chanId = _chanid; }
523  void SetScheduledStartTime(const QDateTime &dt) { m_startTs = dt; }
524  void SetScheduledEndTime( const QDateTime &dt) { m_endTs = dt; }
525  void SetRecordingStartTime(const QDateTime &dt) { m_recStartTs = dt; }
526  void SetRecordingEndTime( const QDateTime &dt) { m_recEndTs = dt; }
527  void SetRecordingGroup(const QString &group) { m_recGroup = group; }
528  void SetPlaybackGroup( const QString &group) { m_playGroup = group; }
529  void SetHostname( const QString &host) { m_hostname = host; }
530  void SetStorageGroup( const QString &group) { m_storageGroup = group; }
531  virtual void SetFilesize( uint64_t sz);
532  void SetSeriesID( const QString &id) { m_seriesId = id; }
533  void SetProgramID( const QString &id) { m_programId = id; }
534  void SetCategory( const QString &cat) { m_category = cat; }
535  void SetCategoryType( const CategoryType type) { m_catType = type; }
536  void SetRecordingPriority(int priority) { m_recPriority = priority; }
537  void SetRecordingPriority2(int priority) { m_recPriority2 = priority; }
538  void SetRecordingRuleID(uint id) { m_recordId = id; }
539  void SetSourceID(uint id) { m_sourceId = id; }
540  void SetInputID(uint id) { m_inputId = id; }
541  void SetReactivated(bool reactivate)
542  {
543  m_programFlags &= ~FL_REACTIVATE;
544  m_programFlags |= (reactivate) ? FL_REACTIVATE : 0;
545  }
546  void SetEditing(bool editing)
547  {
548  m_programFlags &= ~FL_EDITING;
549  m_programFlags |= (editing) ? FL_EDITING : 0;
550  }
551  void SetFlagging(bool flagging)
552  {
553  m_programFlags &= ~FL_COMMFLAG;
554  m_programFlags |= (flagging) ? FL_COMMFLAG : 0;
555  }
558  void SetIgnoreBookmark(bool ignore)
559  {
560  m_programFlags &= ~FL_IGNOREBOOKMARK;
561  m_programFlags |= (ignore) ? FL_IGNOREBOOKMARK : 0;
562  }
565  void SetIgnoreProgStart(bool ignore)
566  {
567  m_programFlags &= ~FL_IGNOREPROGSTART;
568  m_programFlags |= (ignore) ? FL_IGNOREPROGSTART : 0;
569  }
573  void SetAllowLastPlayPos(bool allow)
574  {
575  m_programFlags &= ~FL_ALLOWLASTPLAYPOS;
576  m_programFlags |= (allow) ? FL_ALLOWLASTPLAYPOS : 0;
577  }
578  virtual void SetRecordingID(uint _recordedid)
579  { m_recordedId = _recordedid; }
580  void SetRecordingStatus(RecStatus::Type status) { m_recStatus = status; }
583  { m_positionMapDBReplacement = pmap; }
584 
585  // Slow DB gets
586  QString QueryBasename(void) const;
587 // uint64_t QueryFilesize(void) const; // TODO Remove
588  uint QueryMplexID(void) const;
589  QDateTime QueryBookmarkTimeStamp(void) const;
590  uint64_t QueryBookmark(void) const;
591  uint64_t QueryProgStart(void) const;
592  uint64_t QueryLastPlayPos(void) const;
593  CategoryType QueryCategoryType(void) const;
594  QStringList QueryDVDBookmark(const QString &serialid) const;
595  QStringList QueryBDBookmark(const QString &serialid) const;
596  bool QueryIsEditing(void) const;
597  bool QueryIsInUse(QStringList &byWho) const;
598  bool QueryIsInUse(QString &byWho) const;
599  bool QueryIsDeleteCandidate(bool one_playback_allowed = false) const;
600  AutoExpireType QueryAutoExpire(void) const;
601  TranscodingStatus QueryTranscodeStatus(void) const;
602  bool QueryTuningInfo(QString &channum, QString &input) const;
603  QString QueryInputDisplayName(void) const;
604  uint QueryAverageWidth(void) const;
605  uint QueryAverageHeight(void) const;
606  uint QueryAverageFrameRate(void) const;
607  MarkTypes QueryAverageAspectRatio(void) const;
608  bool QueryAverageScanProgressive(void) const;
609  std::chrono::milliseconds QueryTotalDuration(void) const;
610  int64_t QueryTotalFrames(void) const;
611  QString QueryRecordingGroup(void) const;
612  bool QueryMarkupFlag(MarkTypes type) const;
613  uint QueryTranscoderID(void) const;
614  uint64_t QueryLastFrameInPosMap(void) const;
615  bool Reload(void);
616 
617  // Slow DB sets
618  virtual void SaveFilesize(uint64_t fsize);
619  void SaveBookmark(uint64_t frame);
620  static void SaveDVDBookmark(const QStringList &fields) ;
621  static void SaveBDBookmark(const QStringList &fields) ;
622  void SaveEditing(bool edit);
623  void SaveTranscodeStatus(TranscodingStatus trans);
624  void SaveWatched(bool watchedFlag);
625  void SaveDeletePendingFlag(bool deleteFlag);
626  void SaveCommFlagged(CommFlagStatus flag); // 1 = flagged, 2 = processing
627  void SaveAutoExpire(AutoExpireType autoExpire, bool updateDelete = false);
628  void SavePreserve(bool preserveEpisode);
629  bool SaveBasename(const QString &basename);
630  void SaveAspect(uint64_t frame, MarkTypes type, uint customAspect);
631  void SaveResolution(uint64_t frame, uint width, uint height);
632  void SaveFrameRate(uint64_t frame, uint framerate);
633  void SaveVideoScanType(uint64_t frame, bool progressive);
634  void SaveTotalDuration(std::chrono::milliseconds duration);
635  void SaveTotalFrames(int64_t frames);
636  void SaveVideoProperties(uint mask, uint video_property_flags);
637  void SaveMarkupFlag(MarkTypes type) const;
638  void ClearMarkupFlag(MarkTypes type) const { ClearMarkupMap(type); }
639  void UpdateLastDelete(bool setTime) const;
640  void MarkAsInUse(bool inuse, const QString& usedFor = "");
641  void UpdateInUseMark(bool force = false);
642  void SaveSeasonEpisode(uint seas, uint ep);
643  void SaveInetRef(const QString &inet);
644 
645  // Extremely slow functions that cannot be called from the UI thread.
646  QString DiscoverRecordingDirectory(void);
647  QString GetPlaybackURL(bool checkMaster = false,
648  bool forceCheckLocal = false);
649  ProgramInfoType DiscoverProgramInfoType(void) const;
650 
651  // Edit flagging map
652  bool QueryCutList(frm_dir_map_t &delMap, bool loadAutosave=false) const;
653  void SaveCutList(frm_dir_map_t &delMap, bool isAutoSave=false) const;
654 
655  // Commercial flagging map
656  void QueryCommBreakList(frm_dir_map_t &frames) const;
657  void SaveCommBreakList(frm_dir_map_t &frames) const;
658 
659  // Keyframe positions map
660  void QueryPositionMap(frm_pos_map_t &posMap, MarkTypes type) const;
661  void ClearPositionMap(MarkTypes type) const;
662  void SavePositionMap(frm_pos_map_t &posMap, MarkTypes type,
663  int64_t min_frame = -1, int64_t max_frame = -1) const;
664  void SavePositionMapDelta(frm_pos_map_t &posMap, MarkTypes type) const;
665 
666  // Get position/duration for keyframe and vice versa
667  bool QueryKeyFrameInfo(uint64_t *result, uint64_t position_or_keyframe,
668  bool backwards,
669  MarkTypes type, const char *from_filemarkup_asc,
670  const char *from_filemarkup_desc,
671  const char *from_recordedseek_asc,
672  const char *from_recordedseek_desc) const;
673  bool QueryKeyFramePosition(uint64_t *position, uint64_t keyframe,
674  bool backwards) const;
675  bool QueryPositionKeyFrame(uint64_t *keyframe, uint64_t position,
676  bool backwards) const;
677  bool QueryKeyFrameDuration(uint64_t *duration, uint64_t keyframe,
678  bool backwards) const;
679  bool QueryDurationKeyFrame(uint64_t *keyframe, uint64_t duration,
680  bool backwards) const;
681 
682  // Get/set all markup
683  struct MarkupEntry
684  {
685  int type { -1 }; // MarkTypes
686  uint64_t frame { 0 };
687  uint64_t data { 0 };
688  bool isDataNull { true };
689  MarkupEntry(int t, uint64_t f, uint64_t d, bool n)
690  : type(t), frame(f), data(d), isDataNull(n) {}
691  MarkupEntry(void) = default;
692  };
693  void QueryMarkup(QVector<MarkupEntry> &mapMark,
694  QVector<MarkupEntry> &mapSeek) const;
695  void SaveMarkup(const QVector<MarkupEntry> &mapMark,
696  const QVector<MarkupEntry> &mapSeek) const;
697 
699  void SendUpdateEvent(void) const;
701  void SendAddedEvent(void) const;
703  void SendDeletedEvent(void) const;
704 
706  static QString i18n(const QString &msg);
707 
708  static QString MakeUniqueKey(uint chanid, const QDateTime &recstartts);
709  static bool ExtractKey(const QString &uniquekey,
710  uint &chanid, QDateTime &recstartts);
711  static bool ExtractKeyFromPathname(
712  const QString &pathname, uint &chanid, QDateTime &recstartts);
713  static bool QueryKeyFromPathname(
714  const QString &pathname, uint &chanid, QDateTime &recstartts);
715  static bool QueryRecordedIdFromPathname(const QString &pathname,
716  uint &recordedid);
717 
718  static QString QueryRecordingGroupPassword(const QString &group);
719  static uint64_t QueryBookmark(uint chanid, const QDateTime &recstartts);
720  static QMap<QString,uint32_t> QueryInUseMap(void);
721  static QMap<QString,bool> QueryJobsRunning(int type);
722  static QStringList LoadFromScheduler(const QString &tmptable, int recordid);
723 
724  // Flagging map support methods
725  void QueryMarkupMap(frm_dir_map_t&marks, MarkTypes type,
726  bool merge = false) const;
727  void SaveMarkupMap(const frm_dir_map_t &marks, MarkTypes type = MARK_ALL,
728  int64_t min_frame = -1, int64_t max_frame = -1) const;
729  void ClearMarkupMap(MarkTypes type = MARK_ALL,
730  int64_t min_frame = -1, int64_t max_frame = -1) const;
731 
732  protected:
733  // Creates a basename from the start and end times
734  QString CreateRecordBasename(const QString &ext) const;
735 
736  bool LoadProgramFromRecorded(
737  uint chanid, const QDateTime &recstartts);
738 
739  bool FromStringList(QStringList::const_iterator &it,
740  const QStringList::const_iterator& end);
741 
742  static void QueryMarkupMap(
743  const QString &video_pathname,
744  frm_dir_map_t &marks, MarkTypes type, bool merge = false);
745  static void QueryMarkupMap(
746  uint chanid, const QDateTime &recstartts,
747  frm_dir_map_t &marks, MarkTypes type, bool merge = false);
748 
749  static int InitStatics(void);
750 
751  protected:
752  QString m_title;
753  QString m_sortTitle;
754  QString m_subtitle;
755  QString m_sortSubtitle;
756  QString m_description;
757  uint m_season {0};
758  uint m_episode {0};
759  uint m_totalEpisodes {0};
761  QString m_category;
762  QString m_director;
763 
764  int32_t m_recPriority {0};
765 
766  uint32_t m_chanId {0};
767  QString m_chanStr; // Channum
768  QString m_chanSign; // Callsign
769  QString m_chanName;
771 
772  QString m_recGroup {"Default"};
773  QString m_playGroup {"Default"};
774 
775  mutable QString m_pathname;
776 
777  QString m_hostname;
778  QString m_storageGroup {"Default"};
779 
780  QString m_seriesId;
781  QString m_programId;
782  QString m_inetRef;
783  CategoryType m_catType {kCategoryNone};
784 
785  uint64_t m_fileSize {0ULL};
786 
787  QDateTime m_startTs {MythDate::current(true)};
788  QDateTime m_endTs {m_startTs};
789  QDateTime m_recStartTs {m_startTs};
790  QDateTime m_recEndTs {m_startTs};
791 
792  float m_stars {0.0F};
794  QDateTime m_lastModified {m_startTs};
795  QDateTime m_lastInUseTime {m_startTs.addSecs(-4 * 60 * 60)};
796 
797  int32_t m_recPriority2 {0};
798 
799  uint32_t m_recordId {0};
800  uint32_t m_parentId {0};
801 
802  uint32_t m_sourceId {0};
803  uint32_t m_inputId {0};
804  uint32_t m_findId {0};
805 
806  uint32_t m_programFlags {FL_NONE};
807  VideoPropsType m_videoProperties {VID_UNKNOWN};
808  AudioPropsType m_audioProperties {AUD_UNKNOWN};
809  SubtitlePropsType m_subtitleProperties {SUB_UNKNOWN};
810  uint16_t m_year {0};
811  uint16_t m_partNumber {0};
812  uint16_t m_partTotal {0};
813 
814  int8_t m_recStatus {RecStatus::Unknown};
815  uint8_t m_recType {kNotRecording};
816  uint8_t m_dupIn {kDupsInAll};
817  uint8_t m_dupMethod {kDupCheckSubThenDesc};
818 
819  uint m_recordedId {0};
820  QString m_inputName;
821  QDateTime m_bookmarkUpdate;
822 
823 // everything below this line is not serialized
824  uint8_t m_availableStatus {asAvailable}; // only used for playbackbox.cpp
825  public:
826  void SetAvailableStatus(AvailableStatusType status, const QString &where);
828  { return (AvailableStatusType) m_availableStatus; }
829  int8_t m_spread {-1}; // only used in guidegrid.cpp
830  int8_t m_startCol {-1}; // only used in guidegrid.cpp
831 
832  static const QString kFromRecordedQuery;
833 
834  protected:
835  QString m_inUseForWhat;
836  PMapDBReplacement *m_positionMapDBReplacement {nullptr};
837 
838  static QMutex s_staticDataLock;
840  static bool s_usingProgIDAuth;
841 };
842 
844  ProgramList &destination,
845  const QString &where,
846  const QString &groupBy,
847  const QString &orderBy,
848  const MSqlBindings &bindings,
849  const ProgramList &schedList);
850 
852  ProgramList &destination,
853  const QString &sql,
854  const MSqlBindings &bindings,
855  const ProgramList &schedList);
856 
858  ProgramList &destination,
859  const QString &sql,
860  const MSqlBindings &bindings,
861  const ProgramList &schedList,
862  uint start,
863  uint limit,
864  uint &count);
865 
867  uint chanid, const QDateTime &starttime);
868 
870  ProgramList &destination,
871  const QString &sql,
872  const MSqlBindings &bindings);
873 
875  ProgramList &destination,
876  const QString &sql,
877  const MSqlBindings &bindings,
878  uint start,
879  uint limit,
880  uint &count);
881 
883  ProgramList &destination,
884  bool possiblyInProgressRecordingsOnly,
885  const QMap<QString,uint32_t> &inUseMap,
886  const QMap<QString,bool> &isJobRunning,
887  const QMap<QString, ProgramInfo*> &recMap,
888  int sort = 0,
889  const QString &sortBy = "",
890  bool ignoreLiveTV = false,
891  bool ignoreDeleted = false);
892 
893 template<typename TYPE>
895  AutoDeleteDeque<TYPE*> &destination,
896  bool &hasConflicts,
897  const QString& altTable = "",
898  int recordid = -1)
899 {
900  destination.clear();
901  hasConflicts = false;
902 
903  QStringList slist = ProgramInfo::LoadFromScheduler(altTable, recordid);
904  if (slist.empty())
905  return false;
906 
907  hasConflicts = slist[0].toInt();
908 
909  QStringList::const_iterator sit = slist.cbegin()+2;
910  while (sit != slist.cend())
911  {
912  TYPE *p = new TYPE(sit, slist.cend());
913  destination.push_back(p);
914 
915  if (!p->HasPathname() && !p->GetChanID())
916  {
917  delete p;
918  destination.clear();
919  return false;
920  }
921  }
922 
923  if (destination.size() != slist[1].toUInt())
924  {
925  destination.clear();
926  return false;
927  }
928 
929  return true;
930 }
931 
932 template<typename T>
934 {
935  bool dummyConflicts = false;
936  return LoadFromScheduler(destination, dummyConflicts, "", -1);
937 }
938 
939 // Moved from programdetails.cpp/h, used by MythWelcome/MythShutdown
940 // could be factored out
941 MPUBLIC bool GetNextRecordingList(QDateTime &nextRecordingStart,
942  bool *hasConflicts = nullptr,
943  std::vector<ProgramInfo> *list = nullptr);
944 
945 class QMutex;
947 {
948  public:
951  QMutex *lock;
952  QMap<MarkTypes,frm_pos_map_t> map;
953 };
954 
955 MPUBLIC QString format_season_and_episode(int seasEp, int digits = -1);
956 
959 
962 
963 #endif // MYTHPROGRAM_H_
964 
965 /* 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:519
ProgramInfo::GetSortTitle
QString GetSortTitle(void) const
Definition: programinfo.h:361
MSqlBindings
QMap< QString, QVariant > MSqlBindings
typedef for a map of string -> string bindings for generic queries.
Definition: mythdbcon.h:97
RecStatus::Type
Type
Definition: recStatus.h:16
MSqlQuery
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:124
ProgramInfo::IsMythStream
bool IsMythStream(void) const
Definition: programinfo.h:355
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:338
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:488
ProgramInfo::m_title
QString m_title
Definition: programinfo.h:752
LoadFromScheduler
bool LoadFromScheduler(AutoDeleteDeque< TYPE * > &destination, bool &hasConflicts, const QString &altTable="", int recordid=-1)
Definition: programinfo.h:894
ProgramInfo::SetRecordingStatus
void SetRecordingStatus(RecStatus::Type status)
Definition: programinfo.h:580
ProgramInfo::GetHostname
QString GetHostname(void) const
Definition: programinfo.h:420
ProgramInfo::Verbosity
Verbosity
Definition: programinfo.h:506
ProgramInfo::m_inUseForWhat
QString m_inUseForWhat
Definition: programinfo.h:835
ProgramInfo::ClearInputName
void ClearInputName(void)
Definition: programinfo.h:467
ProgramInfo::GetInputName
QString GetInputName(void) const
Definition: programinfo.h:463
ProgramInfo::m_chanId
uint32_t m_chanId
Definition: programinfo.h:766
ProgramInfo::SetCategory
void SetCategory(const QString &cat)
Definition: programinfo.h:534
ProgramInfo::GetRecordingStartTime
QString GetRecordingStartTime(MythDate::Format fmt) const
Approximate time the recording started (with formatting).
Definition: programinfo.h:405
ProgramInfo::m_recStartTs
QDateTime m_recStartTs
Definition: programinfo.h:789
ProgramInfo::SetRecordingID
virtual void SetRecordingID(uint _recordedid)
Definition: programinfo.h:578
kDupCheckSubThenDesc
@ kDupCheckSubThenDesc
Definition: recordingtypes.h:64
ProgramInfo::m_description
QString m_description
Definition: programinfo.h:756
asAvailable
@ asAvailable
Definition: programtypes.h:178
ProgramInfo::s_staticDataLock
static QMutex s_staticDataLock
Definition: programinfo.h:838
ProgramInfo::MarkupEntry::MarkupEntry
MarkupEntry(int t, uint64_t f, uint64_t d, bool n)
Definition: programinfo.h:689
mythexp.h
ProgramInfo::GetChannelName
QString GetChannelName(void) const
This is the channel name in the local market, i.e.
Definition: programinfo.h:385
ProgramInfo::GetRecordingID
uint GetRecordingID(void) const
Definition: programinfo.h:445
hardwareprofile.devicelist.cat
def cat(file_name)
Definition: devicelist.py:95
PMapDBReplacement
Definition: programinfo.h:946
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:375
ProgramInfo::SetSeriesID
void SetSeriesID(const QString &id)
TODO Move to RecordingInfo.
Definition: programinfo.h:532
AutoDeleteDeque::clear
void clear(void)
Definition: autodeletedeque.h:40
ProgramInfo::kTitleSubtitle
@ kTitleSubtitle
Definition: programinfo.h:509
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:382
ProgramInfo::GetCategory
QString GetCategory(void) const
Definition: programinfo.h:368
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:546
ProgramInfo::s_usingProgIDAuth
static bool s_usingProgIDAuth
Definition: programinfo.h:840
ProgramInfo::SetHostname
void SetHostname(const QString &host)
Definition: programinfo.h:529
ProgramInfo::UsingProgramIDAuthority
static bool UsingProgramIDAuthority(void)
Definition: programinfo.h:323
MythDate::Format
Format
Definition: mythdate.h:15
ProgramInfo::SetScheduledStartTime
void SetScheduledStartTime(const QDateTime &dt)
Definition: programinfo.h:523
ProgramInfo::ProgramInfo
ProgramInfo(QString _title, QString _category, QDateTime _startts, QDateTime _endts)
Constructs a Dummy ProgramInfo (used by GuideGrid)
Definition: programinfo.h:280
AvailableStatusType
AvailableStatusType
Definition: programtypes.h:177
ProgramInfo::IsPathSet
bool IsPathSet(void) const
Definition: programinfo.h:356
ProgramInfo::IsReactivated
bool IsReactivated(void) const
Definition: programinfo.h:489
ProgramInfo::IsInUsePlaying
bool IsInUsePlaying(void) const
Definition: programinfo.h:477
ProgramInfo::GetScheduledEndTime
QDateTime GetScheduledEndTime(void) const
The scheduled end time of the program.
Definition: programinfo.h:396
ProgramInfo::m_bookmarkUpdate
QDateTime m_bookmarkUpdate
Definition: programinfo.h:821
ProgramInfo::SetProgramID
void SetProgramID(const QString &id)
Definition: programinfo.h:533
ProgramInfo::m_pathname
QString m_pathname
Definition: programinfo.h:775
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:414
ProgramInfo::IsSameRecording
bool IsSameRecording(const ProgramInfo &other) const
Definition: programinfo.h:331
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:411
ProgramInfo::GetProgramFlags
uint32_t GetProgramFlags(void) const
Definition: programinfo.h:471
ProgramInfo::GetRecordingGroup
QString GetRecordingGroup(void) const
Definition: programinfo.h:418
ProgramInfo::GetRecordingPriority
int GetRecordingPriority(void) const
Definition: programinfo.h:439
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:403
ProgramInfo::GetPathname
QString GetPathname(void) const
Definition: programinfo.h:342
ProgramInfo::IsWatched
bool IsWatched(void) const
Definition: programinfo.h:482
programtypes.h
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
ProgramInfo::IsPreserved
bool IsPreserved(void) const
Definition: programinfo.h:484
ProgramInfo::GetScheduledStartTime
QString GetScheduledStartTime(MythDate::Format fmt) const
The scheduled start time of program (with formatting).
Definition: programinfo.h:391
ProgramInfo::IsRepeat
bool IsRepeat(void) const
Definition: programinfo.h:487
ProgramInfo::GetInetRef
QString GetInetRef(void) const
Definition: programinfo.h:436
ProgramInfo::GetYearOfInitialRelease
uint GetYearOfInitialRelease(void) const
Definition: programinfo.h:422
RecordingDupInType
RecordingDupInType
Definition: recordingtypes.h:42
ProgramInfo::m_hostname
QString m_hostname
Definition: programinfo.h:777
ProgramInfo::kFromRecordedQuery
static const QString kFromRecordedQuery
Definition: programinfo.h:832
ProgramInfo::GetLastModifiedTime
QString GetLastModifiedTime(MythDate::Format fmt) const
Definition: programinfo.h:429
toString
QString toString(MarkTypes type)
Definition: programtypes.cpp:26
ProgramInfo::IsVideoBD
bool IsVideoBD(void) const
Definition: programinfo.h:348
ProgramInfo::m_chanName
QString m_chanName
Definition: programinfo.h:769
mythdate.h
ProgramInfo::SetRecordingEndTime
void SetRecordingEndTime(const QDateTime &dt)
Definition: programinfo.h:526
ProgramInfo::GetScheduledStartTime
QDateTime GetScheduledStartTime(void) const
The scheduled start time of program.
Definition: programinfo.h:389
ProgramInfo::GetRecordingStatus
RecStatus::Type GetRecordingStatus(void) const
Definition: programinfo.h:446
ProgramInfo::m_category
QString m_category
Definition: programinfo.h:761
ProgramInfo::SetScheduledEndTime
void SetScheduledEndTime(const QDateTime &dt)
Definition: programinfo.h:524
ProgramInfo::SetInputID
void SetInputID(uint id)
Definition: programinfo.h:540
hardwareprofile.config.p
p
Definition: config.py:33
ProgramInfoType
ProgramInfoType
Definition: programtypes.h:168
ProgramInfo::SetRecordingRuleType
void SetRecordingRuleType(RecordingType type)
Definition: programinfo.h:581
ProgramInfo::GetShortInputName
QString GetShortInputName(void) const
Definition: programinfo.h:464
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:360
ProgramInfo::m_seriesId
QString m_seriesId
Definition: programinfo.h:780
ProgramInfo::GetDescription
QString GetDescription(void) const
Definition: programinfo.h:364
ProgramInfo::SetPlaybackGroup
void SetPlaybackGroup(const QString &group)
Definition: programinfo.h:528
TranscodingStatus
TranscodingStatus
Definition: programtypes.h:158
ProgramInfo::SetRecordingGroup
void SetRecordingGroup(const QString &group)
Definition: programinfo.h:527
ProgramInfo::GetEpisodeTotal
uint GetEpisodeTotal(void) const
Definition: programinfo.h:367
MARK_ALL
@ MARK_ALL
Definition: programtypes.h:50
ProgramInfoUpdater
Definition: programinfoupdater.h:48
ProgramInfo::kLongDescription
@ kLongDescription
Definition: programinfo.h:508
ProgramInfo::GetSourceID
uint GetSourceID(void) const
Definition: programinfo.h:461
ProgramInfo::HasCutlist
bool HasCutlist(void) const
Definition: programinfo.h:480
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:753
mythtypes.h
kProgramInfoTypeVideoFile
@ kProgramInfoTypeVideoFile
Definition: programtypes.h:170
clear
static void clear(SettingsMap &cache, SettingsMap &overrides, const QString &myKey)
Definition: mythdb.cpp:866
ProgramInfo::SetRecordingPriority
void SetRecordingPriority(int priority)
Definition: programinfo.h:536
ProgramInfo::ClearMarkupFlag
void ClearMarkupFlag(MarkTypes type) const
Definition: programinfo.h:638
ProgramInfo::MarkupEntry
Definition: programinfo.h:683
ProgramInfo::GetAudioProperties
uint GetAudioProperties(void) const
Definition: programinfo.h:497
ProgramInfo::GetPlaybackGroup
QString GetPlaybackGroup(void) const
Definition: programinfo.h:419
ProgramInfo::kCatName
static const std::array< const QString, 5 > kCatName
Definition: programinfo.h:72
ProgramInfo::GetChannelPlaybackFilters
QString GetChannelPlaybackFilters(void) const
Definition: programinfo.h:386
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:951
ProgramInfo::m_originalAirDate
QDate m_originalAirDate
Definition: programinfo.h:793
ProgramInfo::GetFindID
uint GetFindID(void) const
Definition: programinfo.h:469
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:434
ProgramInfo::CategoryType
CategoryType
Definition: programinfo.h:75
ProgramInfo::GetStorageGroup
QString GetStorageGroup(void) const
Definition: programinfo.h:421
ProgramInfo::ProgramInfo
ProgramInfo(const QStringList &list)
Definition: programinfo.h:291
ProgramInfo::GetSortSubtitle
QString GetSortSubtitle(void) const
Definition: programinfo.h:363
ProgramInfo::GetOriginalAirDate
QDate GetOriginalAirDate(void) const
Definition: programinfo.h:427
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: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:495
ProgramInfo::GetScheduledEndTime
QString GetScheduledEndTime(MythDate::Format fmt) const
The scheduled end time of the program (with formatting).
Definition: programinfo.h:398
ProgramInfo::m_director
QString m_director
Definition: programinfo.h:762
ProgramInfo::GetDuplicateCheckMethod
RecordingDupMethodType GetDuplicateCheckMethod(void) const
What should be compared to determine if two programs are the same?
Definition: programinfo.h:458
AutoDeleteDeque< ProgramInfo * >
ProgramInfo::GetInputID
uint GetInputID(void) const
Definition: programinfo.h:462
ProgramInfo::m_chanPlaybackFilters
QString m_chanPlaybackFilters
Definition: programinfo.h:770
ProgramInfo::SetChanID
void SetChanID(uint _chanid)
Definition: programinfo.h:522
ProgramInfo::kSchedulingKey
@ kSchedulingKey
Definition: programinfo.h:511
LoadFromProgram
MPUBLIC bool LoadFromProgram(ProgramList &destination, const QString &where, const QString &groupBy, const QString &orderBy, const MSqlBindings &bindings, const ProgramList &schedList)
Definition: programinfo.cpp:5566
ProgramInfo::GetChanID
uint GetChanID(void) const
This is the unique key used in the database to locate tuning information.
Definition: programinfo.h:371
ProgramInfo::GetRecordingRuleType
RecordingType GetRecordingRuleType(void) const
Definition: programinfo.h:450
ProgramInfo::GetEpisode
uint GetEpisode(void) const
Definition: programinfo.h:366
ProgramInfo::s_updater
static ProgramInfoUpdater * s_updater
Definition: programinfo.h:839
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:473
ProgramInfo::m_inetRef
QString m_inetRef
Definition: programinfo.h:782
ProgramInfo::m_subtitle
QString m_subtitle
Definition: programinfo.h:754
ProgramInfo::GetLastModifiedTime
QDateTime GetLastModifiedTime(void) const
Definition: programinfo.h:428
ProgramInfo::GetSeason
uint GetSeason(void) const
Definition: programinfo.h:365
ProgramInfo::IsLocal
bool IsLocal(void) const
Definition: programinfo.h:350
ProgramInfo::SetSourceID
void SetSourceID(uint id)
Definition: programinfo.h:539
ProgramInfo::SetIgnoreBookmark
void SetIgnoreBookmark(bool ignore)
If "ignore" is true GetBookmark() will return 0, otherwise GetBookmark() will return the bookmark pos...
Definition: programinfo.h:558
ProgramInfo::IsCommercialFlagged
bool IsCommercialFlagged(void) const
Definition: programinfo.h:479
ProgramInfo::m_syndicatedEpisode
QString m_syndicatedEpisode
Definition: programinfo.h:760
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:537
ProgramInfo::IsVideo
bool IsVideo(void) const
Definition: programinfo.h:485
ProgramInfo::m_chanSign
QString m_chanSign
Definition: programinfo.h:768
ProgramInfo::SetPositionMapDBReplacement
void SetPositionMapDBReplacement(PMapDBReplacement *pmap)
Definition: programinfo.h:582
ProgramInfo::IsAutoExpirable
bool IsAutoExpirable(void) const
Definition: programinfo.h:483
ProgramInfo::IsVideoDVD
bool IsVideoDVD(void) const
Definition: programinfo.h:346
ProgramInfo::SetCategoryType
void SetCategoryType(const CategoryType type)
Definition: programinfo.h:535
ProgramInfo::m_chanStr
QString m_chanStr
Definition: programinfo.h:767
marks
static const std::array< const mark, 16 > marks
Definition: lang.cpp:22
ProgramInfo::IsVideoFile
bool IsVideoFile(void) const
Definition: programinfo.h:344
ProgramInfo::SetFlagging
void SetFlagging(bool flagging)
Definition: programinfo.h:551
ProgramInfo::GetDuplicateCheckSource
RecordingDupInType GetDuplicateCheckSource(void) const
Where should we check for duplicates?
Definition: programinfo.h:454
ProgramInfo::m_sortSubtitle
QString m_sortSubtitle
Definition: programinfo.h:755
ProgramInfo::IsDeletePending
bool IsDeletePending(void) const
Definition: programinfo.h:490
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:820
uint16_t
unsigned short uint16_t
Definition: iso6937tables.h:3
ProgramInfo::SetIgnoreProgStart
void SetIgnoreProgStart(bool ignore)
If "ignore" is true QueryProgStart() will return 0, otherwise QueryProgStart() will return the progst...
Definition: programinfo.h:565
ProgramInfo::GetProgramID
QString GetProgramID(void) const
Definition: programinfo.h:435
ProgramInfo::GetParentRecordingRuleID
uint GetParentRecordingRuleID(void) const
Definition: programinfo.h:449
ProgramInfo::SetRecordingRuleID
void SetRecordingRuleID(uint id)
Definition: programinfo.h:538
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
ProgramInfo::GetRecordingPriority2
int GetRecordingPriority2(void) const
Definition: programinfo.h:440
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:448
ProgramInfo::m_programId
QString m_programId
Definition: programinfo.h:781
ProgramInfo::IsRecording
bool IsRecording(void) const
Definition: programinfo.h:486
string_to_myth_category_type
MPUBLIC ProgramInfo::CategoryType string_to_myth_category_type(const QString &type)
Definition: programinfo.cpp:140
ProgramInfo::GetBasename
QString GetBasename(void) const
Definition: programinfo.h:343
ProgramInfo::GetSubtitleType
uint GetSubtitleType(void) const
Definition: programinfo.h:493
ProgramInfo::GetAvailableStatus
AvailableStatusType GetAvailableStatus(void) const
Definition: programinfo.h:827
ProgramInfo::SetReactivated
void SetReactivated(bool reactivate)
Definition: programinfo.h:541
ProgramInfo::GetCategoryType
CategoryType GetCategoryType(void) const
Definition: programinfo.h:437
ProgramInfo::IsBookmarkSet
bool IsBookmarkSet(void) const
Definition: programinfo.h:481
RecordingType
RecordingType
Definition: recordingtypes.h:19
PMapDBReplacement::map
QMap< MarkTypes, frm_pos_map_t > map
Definition: programinfo.h:952
ProgramInfo::GetStars
uint GetStars(uint range_max) const
Definition: programinfo.h:442
ProgramInfo::IsCommercialFree
bool IsCommercialFree(void) const
Definition: programinfo.h:478
ProgramInfo::SetStorageGroup
void SetStorageGroup(const QString &group)
Definition: programinfo.h:530
CommFlagStatus
CommFlagStatus
Definition: programtypes.h:121
ProgramInfo::HasPathname
bool HasPathname(void) const
Definition: programinfo.h:357
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:573
recStatus.h
pginfo_init_statics
int pginfo_init_statics()
Definition: programinfo.cpp:43
ProgramInfo::GetBookmarkUpdate
QDateTime GetBookmarkUpdate(void) const
Definition: programinfo.h:475
ProgramInfo::kRecordingKey
@ kRecordingKey
Definition: programinfo.h:510
ProgramInfo::GetSubtitle
QString GetSubtitle(void) const
Definition: programinfo.h:362
ProgramInfo::SetRecordingStartTime
void SetRecordingStartTime(const QDateTime &dt)
Definition: programinfo.h:525
ProgramInfo::GetStars
float GetStars(void) const
Definition: programinfo.h:441