MythTV  master
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Static Private Attributes | Friends | List of all members
ProgramInfo Class Reference

Holds information on recordings and videos. More...

#include <programinfo.h>

Inheritance diagram for ProgramInfo:
Inheritance graph
[legend]
Collaboration diagram for ProgramInfo:
Collaboration graph
[legend]

Classes

struct  MarkupEntry
 

Public Types

enum  CategoryType {
  kCategoryNone, kCategoryMovie, kCategorySeries, kCategorySports,
  kCategoryTVShow
}
 
enum  Verbosity { kLongDescription, kTitleSubtitle, kRecordingKey, kSchedulingKey }
 

Public Member Functions

 ProgramInfo (void)
 Null constructor. More...
 
 ProgramInfo (const ProgramInfo &other)
 Copy constructor. More...
 
 ProgramInfo (uint recordedid)
 Constructs a ProgramInfo from data in 'recorded' table. More...
 
 ProgramInfo (uint chanid, const QDateTime &recstartts)
 Constructs a ProgramInfo from data in 'recorded' table. More...
 
 ProgramInfo (uint recordedid, QString title, QString sortTitle, QString subtitle, QString sortSubtitle, QString description, uint season, uint episode, uint totalepisodes, QString syndicatedepisode, QString category, uint chanid, QString channum, QString chansign, QString channame, QString chanplaybackfilters, QString recgroup, QString playgroup, const QString &pathname, QString hostname, QString storagegroup, QString seriesid, QString programid, QString inetref, CategoryType catType, int recpriority, uint64_t filesize, QDateTime startts, QDateTime endts, QDateTime recstartts, QDateTime recendts, float stars, uint year, uint partnumber, uint parttotal, QDate originalAirDate, QDateTime lastmodified, RecStatus::Type recstatus, uint recordid, RecordingDupInType dupin, RecordingDupMethodType dupmethod, uint findid, uint programflags, uint audioproperties, uint videoproperties, uint subtitleType, QString inputname, QDateTime bookmarkupdate)
 Constructs a ProgramInfo from data in 'recorded' table. More...
 
 ProgramInfo (QString title, QString sortTitle, QString subtitle, QString sortSubtitle, QString description, uint season, uint episode, QString category, uint chanid, QString channum, QString chansign, QString channame, QString seriesid, QString programid, QString inetref, QDateTime startts, QDateTime endts, QDateTime recstartts, QDateTime recendts, RecStatus::Type recstatus, uint recordid, RecordingType rectype, uint findid, bool duplicate)
 Constructs a ProgramInfo from data in 'oldrecorded' table. More...
 
 ProgramInfo (QString title, QString sortTitle, QString subtitle, QString sortSubtitle, QString description, QString syndicatedepisode, QString category, uint chanid, QString channum, QString chansign, QString channame, QString chanplaybackfilters, QDateTime startts, QDateTime endts, QDateTime recstartts, QDateTime recendts, QString seriesid, QString programid, CategoryType catType, float stars, uint year, uint partnumber, uint parttotal, QDate originalAirDate, RecStatus::Type recstatus, uint recordid, RecordingType rectype, uint findid, bool commfree, bool repeat, uint videoproperties, uint audioproperties, uint subtitletype, uint season, uint episode, uint totalepisodes, const ProgramList &schedList)
 Constructs a ProgramInfo from listings data in 'program' table. More...
 
 ProgramInfo (QString title, QString sortTitle, QString subtitle, QString sortSubtitle, QString description, uint season, uint episode, uint totalepisodes, QString category, uint chanid, QString channum, QString chansign, QString channame, QString chanplaybackfilters, QString recgroup, QString playgroup, QDateTime startts, QDateTime endts, QDateTime recstartts, QDateTime recendts, QString seriesid, QString programid, QString inetref, QString inputname)
 Constructs a basic ProgramInfo (used by RecordingInfo) More...
 
 ProgramInfo (const QString &pathname)
 Constructs a ProgramInfo for a pathname. More...
 
 ProgramInfo (const QString &pathname, const QString &plot, const QString &title, const QString &sortTitle, const QString &subtitle, const QString &sortSubtitle, const QString &director, int season, int episode, const QString &inetref, std::chrono::minutes length_in_minutes, uint year, const QString &programid)
 Constructs a ProgramInfo for a video. More...
 
 ProgramInfo (const QString &_title, uint _chanid, const QDateTime &_startts, const QDateTime &_endts)
 Constructs a manual record ProgramInfo. More...
 
 ProgramInfo (QString _title, QString _category, QDateTime _startts, QDateTime _endts)
 Constructs a Dummy ProgramInfo (used by GuideGrid) More...
 
 ProgramInfo (QStringList::const_iterator &it, const QStringList::const_iterator &end)
 
 ProgramInfo (const QStringList &list)
 
bool operator== (const ProgramInfo &rhs)
 
ProgramInfooperator= (const ProgramInfo &other)
 Copies important fields from other ProgramInfo. More...
 
virtual void clone (const ProgramInfo &other, bool ignore_non_serialized_data=false)
 Copies important fields from other ProgramInfo. More...
 
void ensureSortFields (void)
 Ensure that the sortTitle and sortSubtitle fields are set. More...
 
virtual void clear (void)
 
virtual ~ProgramInfo ()=default
 
void ToStringList (QStringList &list) const
 Serializes ProgramInfo into a QStringList which can be passed over a socket. More...
 
virtual void ToMap (InfoMap &progMap, bool showrerecord=false, uint star_range=10, uint date_format=0) const
 Converts ProgramInfo into QString QHash containing each field in ProgramInfo converted into localized strings. More...
 
virtual void SubstituteMatches (QString &str)
 Subsitute MATCH% type variable names in the given string. More...
 
bool IsSameProgram (const ProgramInfo &other) const
 Checks whether this is the same program as "other", which may or may not be a repeat or on another channel. More...
 
bool IsDuplicateProgram (const ProgramInfo &other) const
 Checks for duplicates according to dupmethod. More...
 
bool IsSameProgramAndStartTime (const ProgramInfo &other) const
 Match same program, with same starttime (channel may be different) More...
 
bool IsSameTitleStartTimeAndChannel (const ProgramInfo &other) const
 Checks title, chanid or callsign and start times for equality. More...
 
bool IsSameTitleTimeslotAndChannel (const ProgramInfo &other) const
 Checks title, chanid or chansign, start/end times, cardid, inputid for fully inclusive overlap. More...
 
bool IsSameProgramWeakCheck (const ProgramInfo &other) const
 Checks for duplicate using only title, chanid and startts. More...
 
bool IsSameRecording (const ProgramInfo &other) const
 
bool IsSameChannel (const ProgramInfo &other) const
 Checks whether channel id or callsign are identical. More...
 
QString MakeUniqueKey (void) const
 Creates a unique string that can be used to identify an existing recording. More...
 
std::chrono::seconds GetSecondsInRecording (void) const
 Returns length of program/recording in seconds. More...
 
QString ChannelText (const QString &format) const
 Returns channel info using "format". More...
 
QString GetPathname (void) const
 
QString GetBasename (void) const
 
bool IsVideoFile (void) const
 
bool IsVideoDVD (void) const
 
bool IsVideoBD (void) const
 
bool IsLocal (void) const
 
bool IsMythStream (void) const
 
bool IsPathSet (void) const
 
bool HasPathname (void) const
 
bool IsFileReadable (void)
 Attempts to ascertain if the main file for this ProgramInfo is readable. More...
 
QString GetTitle (void) const
 
QString GetSortTitle (void) const
 
QString GetSubtitle (void) const
 
QString GetSortSubtitle (void) const
 
QString GetDescription (void) const
 
uint GetSeason (void) const
 
uint GetEpisode (void) const
 
uint GetEpisodeTotal (void) const
 
QString GetCategory (void) const
 
uint GetChanID (void) const
 This is the unique key used in the database to locate tuning information. More...
 
QString GetChanNum (void) const
 This is the channel "number", in the form 1, 1_2, 1-2, 1#1, etc. More...
 
QString GetChannelSchedulingID (void) const
 This is the unique programming identifier of a channel. More...
 
QString GetChannelName (void) const
 This is the channel name in the local market, i.e. More...
 
QString GetChannelPlaybackFilters (void) const
 
QDateTime GetScheduledStartTime (void) const
 The scheduled start time of program. More...
 
QString GetScheduledStartTime (MythDate::Format fmt) const
 The scheduled start time of program (with formatting). More...
 
QDateTime GetScheduledEndTime (void) const
 The scheduled end time of the program. More...
 
QString GetScheduledEndTime (MythDate::Format fmt) const
 The scheduled end time of the program (with formatting). More...
 
QDateTime GetRecordingStartTime (void) const
 Approximate time the recording started. More...
 
QString GetRecordingStartTime (MythDate::Format fmt) const
 Approximate time the recording started (with formatting). More...
 
QDateTime GetRecordingEndTime (void) const
 Approximate time the recording should have ended, did end, or is intended to end. More...
 
QString GetRecordingEndTime (MythDate::Format fmt) const
 Approximate time the recording should have ended, did end, or is intended to end (with formatting). More...
 
QString GetRecordingGroup (void) const
 
QString GetPlaybackGroup (void) const
 
QString GetHostname (void) const
 
QString GetStorageGroup (void) const
 
uint GetYearOfInitialRelease (void) const
 
QDate GetOriginalAirDate (void) const
 
QDateTime GetLastModifiedTime (void) const
 
QString GetLastModifiedTime (MythDate::Format fmt) const
 
virtual uint64_t GetFilesize (void) const
 
QString GetSeriesID (void) const
 
QString GetProgramID (void) const
 
QString GetInetRef (void) const
 
CategoryType GetCategoryType (void) const
 
QString GetCategoryTypeString (void) const
 Returns catType as a string. More...
 
int GetRecordingPriority (void) const
 
int GetRecordingPriority2 (void) const
 
float GetStars (void) const
 
uint GetStars (uint range_max) const
 
uint GetRecordingID (void) const
 
RecStatus::Type GetRecordingStatus (void) const
 
uint GetRecordingRuleID (void) const
 
uint GetParentRecordingRuleID (void) const
 
RecordingType GetRecordingRuleType (void) const
 
RecordingDupInType GetDuplicateCheckSource (void) const
 Where should we check for duplicates? More...
 
RecordingDupMethodType GetDuplicateCheckMethod (void) const
 What should be compared to determine if two programs are the same? More...
 
uint GetSourceID (void) const
 
uint GetInputID (void) const
 
QString GetInputName (void) const
 
QString GetShortInputName (void) const
 
void ClearInputName (void)
 
uint GetFindID (void) const
 
uint32_t GetProgramFlags (void) const
 
QString GetProgramFlagNames (void) const
 
ProgramInfoType GetProgramInfoType (void) const
 
QDateTime GetBookmarkUpdate (void) const
 
bool IsGeneric (void) const
 
bool IsInUsePlaying (void) const
 
bool IsCommercialFree (void) const
 
bool IsCommercialFlagged (void) const
 
bool HasCutlist (void) const
 
bool IsBookmarkSet (void) const
 
bool IsLastPlaySet (void) const
 
bool IsWatched (void) const
 
bool IsAutoExpirable (void) const
 
bool IsPreserved (void) const
 
bool IsVideo (void) const
 
bool IsRecording (void) const
 
bool IsRepeat (void) const
 
bool IsDuplicate (void) const
 
bool IsReactivated (void) const
 
bool IsDeletePending (void) const
 
uint GetSubtitleType (void) const
 
QString GetSubtitleTypeNames (void) const
 
uint GetVideoProperties (void) const
 
QString GetVideoPropertyNames (void) const
 
uint GetAudioProperties (void) const
 
QString GetAudioPropertyNames (void) const
 
void ProgramFlagsFromNames (const QString &names)
 
QString toString (Verbosity v=kLongDescription, const QString &sep=":", const QString &grp="\"") const
 
void SetTitle (const QString &t, const QString &st=nullptr)
 
void SetSubtitle (const QString &st, const QString &sst=nullptr)
 
void SetProgramInfoType (ProgramInfoType t)
 
void SetPathname (const QString &pn)
 
void SetChanID (uint _chanid)
 
void SetScheduledStartTime (const QDateTime &dt)
 
void SetScheduledEndTime (const QDateTime &dt)
 
void SetRecordingStartTime (const QDateTime &dt)
 
void SetRecordingEndTime (const QDateTime &dt)
 
void SetRecordingGroup (const QString &group)
 
void SetPlaybackGroup (const QString &group)
 
void SetHostname (const QString &host)
 
void SetStorageGroup (const QString &group)
 
virtual void SetFilesize (uint64_t sz)
 
void SetSeriesID (const QString &id)
 TODO Move to RecordingInfo. More...
 
void SetProgramID (const QString &id)
 
void SetCategory (const QString &cat)
 
void SetCategoryType (const CategoryType type)
 
void SetRecordingPriority (int priority)
 
void SetRecordingPriority2 (int priority)
 
void SetRecordingRuleID (uint id)
 
void SetSourceID (uint id)
 
void SetInputID (uint id)
 
void SetReactivated (bool reactivate)
 
void SetEditing (bool editing)
 
void SetFlagging (bool flagging)
 
void SetIgnoreBookmark (bool ignore)
 If "ignore" is true GetBookmark() will return 0, otherwise GetBookmark() will return the bookmark position if it exists. More...
 
void SetIgnoreProgStart (bool ignore)
 If "ignore" is true QueryProgStart() will return 0, otherwise QueryProgStart() will return the progstart position if it exists. More...
 
void SetIgnoreLastPlayPos (bool ignore)
 If "ignore" is true QueryLastPlayPos() will return 0, otherwise QueryLastPlayPos() will return the last playback position if it exists. More...
 
virtual void SetRecordingID (uint _recordedid)
 
void SetRecordingStatus (RecStatus::Type status)
 
void SetRecordingRuleType (RecordingType type)
 
void SetPositionMapDBReplacement (PMapDBReplacement *pmap)
 
void CalculateRecordedProgress ()
 
uint GetRecordedPercent () const
 
void CalculateWatchedProgress (uint64_t pos)
 
uint GetWatchedPercent () const
 
void SetWatchedPercent (uint progress)
 
void CalculateProgress (uint64_t pos)
 
QString QueryBasename (void) const
 Gets the basename, from the DB if necessary. More...
 
uint QueryMplexID (void) const
 Queries multiplex any recording would be made on, zero if unknown. More...
 
QDateTime QueryBookmarkTimeStamp (void) const
 Queries Latest bookmark timestamp from the database. More...
 
uint64_t QueryBookmark (void) const
 Gets any bookmark position in database, unless the ignore bookmark flag is set. More...
 
uint64_t QueryProgStart (void) const
 Gets any progstart position in database, unless the ignore progstart flag is set. More...
 
uint64_t QueryLastPlayPos (void) const
 Gets any lastplaypos position in database, unless the ignore lastplaypos flag is set. More...
 
uint64_t QueryStartMark (void) const
 
CategoryType QueryCategoryType (void) const
 Queries recordedprogram to get the category_type of the recording. More...
 
QStringList QueryDVDBookmark (const QString &serialid) const
 Queries "dvdbookmark" table for bookmarking DVD serial number. More...
 
QStringList QueryBDBookmark (const QString &serialid) const
 Queries "bdbookmark" table for bookmarking BD serial number. More...
 
bool QueryIsEditing (void) const
 Queries "recorded" table for its "editing" field and returns true if it is set to true. More...
 
bool QueryIsInUse (QStringList &byWho) const
 Returns true if Program is in use. More...
 
bool QueryIsInUse (QString &byWho) const
 Returns true if Program is in use. More...
 
bool QueryIsDeleteCandidate (bool one_playback_allowed=false) const
 Returns true iff this is a recording, it is not in use (except by the recorder), and at most one player iff one_playback_allowed is set. More...
 
AutoExpireType QueryAutoExpire (void) const
 Returns "autoexpire" field from "recorded" table. More...
 
TranscodingStatus QueryTranscodeStatus (void) const
 Returns the "transcoded" field in "recorded" table. More...
 
bool QueryTuningInfo (QString &channum, QString &input) const
 Returns the channel and input needed to record the program. More...
 
QString QueryInputDisplayName (void) const
 
uint QueryAverageWidth (void) const
 If present in recording this loads average width of the main video stream from database's stream markup table. More...
 
uint QueryAverageHeight (void) const
 If present in recording this loads average height of the main video stream from database's stream markup table. More...
 
uint QueryAverageFrameRate (void) const
 If present in recording this loads average frame rate of the main video stream from database's stream markup table. More...
 
MarkTypes QueryAverageAspectRatio (void) const
 
bool QueryAverageScanProgressive (void) const
 If present in recording this loads average video scan type of the main video stream from database's stream markup table. More...
 
std::chrono::milliseconds QueryTotalDuration (void) const
 If present this loads the total duration in milliseconds of the main video stream from recordedmarkup table in the database. More...
 
int64_t QueryTotalFrames (void) const
 If present in recording this loads total frames of the main video stream from database's stream markup table. More...
 
QString QueryRecordingGroup (void) const
 Query recgroup from recorded. More...
 
bool QueryMarkupFlag (MarkTypes type) const
 Returns true iff the speficied mark type is set on frame 0. More...
 
uint QueryTranscoderID (void) const
 
uint64_t QueryLastFrameInPosMap (void) const
 Returns last frame in position map or 0. More...
 
bool Reload (void)
 
virtual void SaveFilesize (uint64_t fsize)
 Sets recording file size in database, and sets "filesize" field. More...
 
void SaveLastPlayPos (uint64_t frame)
 TODO Move to RecordingInfo. More...
 
void SaveBookmark (uint64_t frame)
 Clears any existing bookmark in DB and if frame is greater than 0 sets a new bookmark. More...
 
void SaveEditing (bool edit)
 Sets "editing" field in "recorded" table to "edit". More...
 
void SaveTranscodeStatus (TranscodingStatus trans)
 Set "transcoded" field in "recorded" table to "trans". More...
 
void SaveWatched (bool watchedFlag)
 Set "watched" field in recorded/videometadata to "watchedFlag". More...
 
void SaveDeletePendingFlag (bool deleteFlag)
 Set "deletepending" field in "recorded" table to "deleteFlag". More...
 
void SaveCommFlagged (CommFlagStatus flag)
 Set "commflagged" field in "recorded" table to "flag". More...
 
void SaveAutoExpire (AutoExpireType autoExpire, bool updateDelete=false)
 Set "autoexpire" field in "recorded" table to "autoExpire". More...
 
void SavePreserve (bool preserveEpisode)
 Set "preserve" field in "recorded" table to "preserveEpisode". More...
 
bool SaveBasename (const QString &basename)
 Sets a recording's basename in the database. More...
 
void SaveAspect (uint64_t frame, MarkTypes type, uint customAspect)
 Store aspect ratio of a frame in the recordedmark table. More...
 
void SaveResolution (uint64_t frame, uint width, uint height)
 Store the Resolution at frame in the recordedmarkup table. More...
 
void SaveFrameRate (uint64_t frame, uint framerate)
 Store the Frame Rate at frame in the recordedmarkup table. More...
 
void SaveVideoScanType (uint64_t frame, bool progressive)
 Store the Progressive/Interlaced state in the recordedmarkup table. More...
 
void SaveTotalDuration (std::chrono::milliseconds duration)
 Store the Total Duration at frame 0 in the recordedmarkup table. More...
 
void SaveTotalFrames (int64_t frames)
 Store the Total Frames at frame 0 in the recordedmarkup table. More...
 
void SaveVideoProperties (uint mask, uint video_property_flags)
 
void SaveMarkupFlag (MarkTypes type) const
 Clears the specified flag, then if sets it. More...
 
void ClearMarkupFlag (MarkTypes type) const
 
void UpdateLastDelete (bool setTime) const
 Set or unset the record.last_delete field. More...
 
void MarkAsInUse (bool inuse, const QString &usedFor="")
 Tracks a recording's in use status, to prevent deletion and to allow the storage scheduler to perform IO load balancing. More...
 
void UpdateInUseMark (bool force=false)
 
void SaveSeasonEpisode (uint seas, uint ep)
 
void SaveInetRef (const QString &inet)
 
QString DiscoverRecordingDirectory (void)
 
QString GetPlaybackURL (bool checkMaster=false, bool forceCheckLocal=false)
 Returns filename or URL to be used to play back this recording. More...
 
ProgramInfoType DiscoverProgramInfoType (void) const
 
bool QueryCutList (frm_dir_map_t &delMap, bool loadAutosave=false) const
 
void SaveCutList (frm_dir_map_t &delMap, bool isAutoSave=false) const
 
void QueryCommBreakList (frm_dir_map_t &frames) const
 
void SaveCommBreakList (frm_dir_map_t &frames) const
 
void QueryPositionMap (frm_pos_map_t &posMap, MarkTypes type) const
 
void ClearPositionMap (MarkTypes type) const
 
void SavePositionMap (frm_pos_map_t &posMap, MarkTypes type, int64_t min_frame=-1, int64_t max_frame=-1) const
 
void SavePositionMapDelta (frm_pos_map_t &posMap, MarkTypes type) const
 
bool QueryKeyFrameInfo (uint64_t *result, uint64_t position_or_keyframe, bool backwards, MarkTypes type, const char *from_filemarkup_asc, const char *from_filemarkup_desc, const char *from_recordedseek_asc, const char *from_recordedseek_desc) const
 
bool QueryKeyFramePosition (uint64_t *position, uint64_t keyframe, bool backwards) const
 
bool QueryPositionKeyFrame (uint64_t *keyframe, uint64_t position, bool backwards) const
 
bool QueryKeyFrameDuration (uint64_t *duration, uint64_t keyframe, bool backwards) const
 
bool QueryDurationKeyFrame (uint64_t *keyframe, uint64_t duration, bool backwards) const
 
void QueryMarkup (QVector< MarkupEntry > &mapMark, QVector< MarkupEntry > &mapSeek) const
 
void SaveMarkup (const QVector< MarkupEntry > &mapMark, const QVector< MarkupEntry > &mapSeek) const
 
void SendUpdateEvent (void) const
 Sends event out that the ProgramInfo should be reloaded. More...
 
void SendAddedEvent (void) const
 Sends event out that the ProgramInfo should be added to lists. More...
 
void SendDeletedEvent (void) const
 Sends event out that the ProgramInfo should be delete from lists. More...
 
void UpdateMarkTimeStamp (bool bookmarked) const
 
void UpdateLastPlayTimeStamp (bool lastplay) const
 
void QueryMarkupMap (frm_dir_map_t &marks, MarkTypes type, bool merge=false) const
 
void SaveMarkupMap (const frm_dir_map_t &marks, MarkTypes type=MARK_ALL, int64_t min_frame=-1, int64_t max_frame=-1) const
 
void ClearMarkupMap (MarkTypes type=MARK_ALL, int64_t min_frame=-1, int64_t max_frame=-1) const
 
void SetAvailableStatus (AvailableStatusType status, const QString &where)
 
AvailableStatusType GetAvailableStatus (void) const
 

Static Public Member Functions

static bool UsingProgramIDAuthority (void)
 
static void CheckProgramIDAuthorities (void)
 
static uint SubtitleTypesFromNames (const QString &names)
 
static uint VideoPropertiesFromNames (const QString &names)
 
static uint AudioPropertiesFromNames (const QString &names)
 
static void SaveDVDBookmark (const QStringList &fields)
 
static void SaveBDBookmark (const QStringList &fields)
 
static QString i18n (const QString &msg)
 Translations for play,recording, & storage groups +. More...
 
static QString MakeUniqueKey (uint chanid, const QDateTime &recstartts)
 Creates a unique string that can be used to identify a recording. More...
 
static bool ExtractKey (const QString &uniquekey, uint &chanid, QDateTime &recstartts)
 Extracts chanid and recstartts from a unique key generated by MakeUniqueKey(). More...
 
static bool ExtractKeyFromPathname (const QString &pathname, uint &chanid, QDateTime &recstartts)
 
static bool QueryKeyFromPathname (const QString &pathname, uint &chanid, QDateTime &recstartts)
 
static bool QueryRecordedIdFromPathname (const QString &pathname, uint &recordedid)
 
static QString QueryRecordingGroupPassword (const QString &group)
 
static uint64_t QueryBookmark (uint chanid, const QDateTime &recstartts)
 
static QMap< QString, uint32_t > QueryInUseMap (void)
 
static QMap< QString, boolQueryJobsRunning (int type)
 
static QStringList LoadFromScheduler (const QString &tmptable, int recordid)
 

Public Attributes

int8_t m_spread {-1}
 
int8_t m_startCol {-1}
 
QDateTime m_previewUpdate
 

Static Public Attributes

static constexpr int kNumCatTypes = 5
 
static const QString kFromRecordedQuery
 

Protected Member Functions

QString CreateRecordBasename (const QString &ext) const
 Returns a filename for a recording based on the recording channel and date. More...
 
bool LoadProgramFromRecorded (uint chanid, const QDateTime &recstartts)
 Loads ProgramInfo for an existing recording. More...
 
bool FromStringList (QStringList::const_iterator &it, const QStringList::const_iterator &end)
 Uses a QStringList to initialize this ProgramInfo instance. More...
 

Static Protected Member Functions

static void QueryMarkupMap (const QString &video_pathname, frm_dir_map_t &marks, MarkTypes type, bool merge=false)
 
static void QueryMarkupMap (uint chanid, const QDateTime &recstartts, frm_dir_map_t &marks, MarkTypes type, bool merge=false)
 
static int InitStatics (void)
 

Protected Attributes

QString m_title
 
QString m_sortTitle
 
QString m_subtitle
 
QString m_sortSubtitle
 
QString m_description
 
uint m_season {0}
 
uint m_episode {0}
 
uint m_totalEpisodes {0}
 
QString m_syndicatedEpisode
 
QString m_category
 
QString m_director
 
int32_t m_recPriority {0}
 
uint32_t m_chanId {0}
 
QString m_chanStr
 
QString m_chanSign
 
QString m_chanName
 
QString m_chanPlaybackFilters
 
QString m_recGroup {"Default"}
 
QString m_playGroup {"Default"}
 
QString m_pathname
 
QString m_hostname
 
QString m_storageGroup {"Default"}
 
QString m_seriesId
 
QString m_programId
 
QString m_inetRef
 
CategoryType m_catType {kCategoryNone}
 
uint64_t m_fileSize {0ULL}
 
QDateTime m_startTs {MythDate::current(true)}
 
QDateTime m_endTs {m_startTs}
 
QDateTime m_recStartTs {m_startTs}
 
QDateTime m_recEndTs {m_startTs}
 
float m_stars {0.0F}
 Rating, range [0..1]. More...
 
QDate m_originalAirDate
 
QDateTime m_lastModified {m_startTs}
 
QDateTime m_lastInUseTime {m_startTs.addSecs(-kLastInUseOffset)}
 
int32_t m_recPriority2 {0}
 
uint32_t m_recordId {0}
 
uint32_t m_parentId {0}
 
uint32_t m_sourceId {0}
 
uint32_t m_inputId {0}
 
uint32_t m_findId {0}
 
uint32_t m_programFlags {FL_NONE}
 ProgramFlag. More...
 
VideoPropsType m_videoProperties {VID_UNKNOWN}
 
AudioPropsType m_audioProperties {AUD_UNKNOWN}
 
SubtitlePropsType m_subtitleProperties {SUB_UNKNOWN}
 
uint16_t m_year {0}
 
uint16_t m_partNumber {0}
 
uint16_t m_partTotal {0}
 
int8_t m_recStatus {RecStatus::Unknown}
 
uint8_t m_recType {kNotRecording}
 
uint8_t m_dupIn {kDupsInAll}
 
uint8_t m_dupMethod {kDupCheckSubThenDesc}
 
uint m_recordedId {0}
 
QString m_inputName
 
QDateTime m_bookmarkUpdate
 
uint8_t m_availableStatus {asAvailable}
 
int8_t m_recordedPercent {-1}
 
int8_t m_watchedPercent {-1}
 
QString m_inUseForWhat
 
PMapDBReplacementm_positionMapDBReplacement {nullptr}
 

Static Protected Attributes

static constexpr int64_t kLastInUseOffset {4LL * 60 * 60}
 
static QMutex s_staticDataLock
 
static ProgramInfoUpdaters_updater
 
static bool s_usingProgIDAuth = true
 

Static Private Attributes

static const std::array< const QString, 5 > kCatName
 

Friends

class TestRecordingExtender
 
int pginfo_init_statics (void)
 

Detailed Description

Holds information on recordings and videos.

ProgramInfo can also contain partial information for a program we wish to find in the schedule, and may also contain information on a video we wish to view. This class is serializable from frontend to backend and back and is the basic unit of information on anything we may wish to view or record.

Any method that begins with "Is", "Get" or "Set" will run quickly and the results from "Is" or "Get" do not need to be cached.

Any method beginning with "Make" or "Extract" will run quickly, but it may be prudent to cache the results if they are to be used frequently.

Any method that begins with "Query", "Save" or "Update" will touch the database and so may take some time to complete.

Any method beginning with another verb needs to be examined to determine its expected run time.

There is one exception to this set of rules, GetPlaybackURL() is a very complex beast which not only touches the database but also may query remote backends about the files visible to them. It blocks until this task is complete and may need to wake up remote hosts that are currently powered off to complete it's task. It should not be called from the UI thread and its result should be cached.

Definition at line 67 of file programinfo.h.

Member Enumeration Documentation

◆ CategoryType

Enumerator
kCategoryNone 
kCategoryMovie 
kCategorySeries 
kCategorySports 
kCategoryTVShow 

Definition at line 76 of file programinfo.h.

◆ Verbosity

Enumerator
kLongDescription 
kTitleSubtitle 
kRecordingKey 
kSchedulingKey 

Definition at line 506 of file programinfo.h.

Constructor & Destructor Documentation

◆ ProgramInfo() [1/14]

ProgramInfo::ProgramInfo ( void  )
inline

Null constructor.

Constructs a manual record ProgramInfo.

Constructs a ProgramInfo for a video.

Constructs a basic ProgramInfo (used by RecordingInfo)

Constructs a ProgramInfo from listings data in 'program' table.

Constructs a ProgramInfo from data in 'oldrecorded' table.

Constructs a ProgramInfo from data in 'recorded' table.

Definition at line 80 of file programinfo.h.

Referenced by LoadFromOldRecorded(), LoadFromProgram(), LoadFromRecorded(), and LoadProgramFromProgram().

◆ ProgramInfo() [2/14]

ProgramInfo::ProgramInfo ( const ProgramInfo other)

Copy constructor.

Definition at line 148 of file programinfo.cpp.

◆ ProgramInfo() [3/14]

ProgramInfo::ProgramInfo ( uint  recordedid)
explicit

Constructs a ProgramInfo from data in 'recorded' table.

Definition at line 234 of file programinfo.cpp.

◆ ProgramInfo() [4/14]

ProgramInfo::ProgramInfo ( uint  chanid,
const QDateTime &  recstartts 
)

Constructs a ProgramInfo from data in 'recorded' table.

Definition at line 265 of file programinfo.cpp.

◆ ProgramInfo() [5/14]

ProgramInfo::ProgramInfo ( uint  recordedid,
QString  title,
QString  sortTitle,
QString  subtitle,
QString  sortSubtitle,
QString  description,
uint  season,
uint  episode,
uint  totalepisodes,
QString  syndicatedepisode,
QString  category,
uint  chanid,
QString  channum,
QString  chansign,
QString  channame,
QString  chanplaybackfilters,
QString  recgroup,
QString  playgroup,
const QString &  pathname,
QString  hostname,
QString  storagegroup,
QString  seriesid,
QString  programid,
QString  inetref,
CategoryType  catType,
int  recpriority,
uint64_t  filesize,
QDateTime  startts,
QDateTime  endts,
QDateTime  recstartts,
QDateTime  recendts,
float  stars,
uint  year,
uint  partnumber,
uint  parttotal,
QDate  originalAirDate,
QDateTime  lastmodified,
RecStatus::Type  recstatus,
uint  recordid,
RecordingDupInType  dupin,
RecordingDupMethodType  dupmethod,
uint  findid,
uint  programflags,
uint  audioproperties,
uint  videoproperties,
uint  subtitleType,
QString  inputname,
QDateTime  bookmarkupdate 
)

Constructs a ProgramInfo from data in 'recorded' table.

Definition at line 276 of file programinfo.cpp.

◆ ProgramInfo() [6/14]

ProgramInfo::ProgramInfo ( QString  title,
QString  sortTitle,
QString  subtitle,
QString  sortSubtitle,
QString  description,
uint  season,
uint  episode,
QString  category,
uint  chanid,
QString  channum,
QString  chansign,
QString  channame,
QString  seriesid,
QString  programid,
QString  inetref,
QDateTime  startts,
QDateTime  endts,
QDateTime  recstartts,
QDateTime  recendts,
RecStatus::Type  recstatus,
uint  recordid,
RecordingType  rectype,
uint  findid,
bool  duplicate 
)

Constructs a ProgramInfo from data in 'oldrecorded' table.

Definition at line 414 of file programinfo.cpp.

◆ ProgramInfo() [7/14]

ProgramInfo::ProgramInfo ( QString  title,
QString  sortTitle,
QString  subtitle,
QString  sortSubtitle,
QString  description,
QString  syndicatedepisode,
QString  category,
uint  chanid,
QString  channum,
QString  chansign,
QString  channame,
QString  chanplaybackfilters,
QDateTime  startts,
QDateTime  endts,
QDateTime  recstartts,
QDateTime  recendts,
QString  seriesid,
QString  programid,
CategoryType  catType,
float  stars,
uint  year,
uint  partnumber,
uint  parttotal,
QDate  originalAirDate,
RecStatus::Type  recstatus,
uint  recordid,
RecordingType  rectype,
uint  findid,
bool  commfree,
bool  repeat,
uint  videoproperties,
uint  audioproperties,
uint  subtitletype,
uint  season,
uint  episode,
uint  totalepisodes,
const ProgramList schedList 
)

Constructs a ProgramInfo from listings data in 'program' table.

Definition at line 489 of file programinfo.cpp.

◆ ProgramInfo() [8/14]

ProgramInfo::ProgramInfo ( QString  title,
QString  sortTitle,
QString  subtitle,
QString  sortSubtitle,
QString  description,
uint  season,
uint  episode,
uint  totalepisodes,
QString  category,
uint  chanid,
QString  channum,
QString  chansign,
QString  channame,
QString  chanplaybackfilters,
QString  recgroup,
QString  playgroup,
QDateTime  startts,
QDateTime  endts,
QDateTime  recstartts,
QDateTime  recendts,
QString  seriesid,
QString  programid,
QString  inetref,
QString  inputname 
)

Constructs a basic ProgramInfo (used by RecordingInfo)

Definition at line 633 of file programinfo.cpp.

◆ ProgramInfo() [9/14]

ProgramInfo::ProgramInfo ( const QString &  pathname)
explicit

Constructs a ProgramInfo for a pathname.

Definition at line 701 of file programinfo.cpp.

◆ ProgramInfo() [10/14]

ProgramInfo::ProgramInfo ( const QString &  pathname,
const QString &  plot,
const QString &  title,
const QString &  sortTitle,
const QString &  subtitle,
const QString &  sortSubtitle,
const QString &  director,
int  season,
int  episode,
const QString &  inetref,
std::chrono::minutes  length_in_minutes,
uint  year,
const QString &  programid 
)

Constructs a ProgramInfo for a video.

Definition at line 737 of file programinfo.cpp.

◆ ProgramInfo() [11/14]

ProgramInfo::ProgramInfo ( const QString &  _title,
uint  _chanid,
const QDateTime &  _startts,
const QDateTime &  _endts 
)

Constructs a manual record ProgramInfo.

Definition at line 782 of file programinfo.cpp.

◆ ProgramInfo() [12/14]

ProgramInfo::ProgramInfo ( QString  _title,
QString  _category,
QDateTime  _startts,
QDateTime  _endts 
)
inline

Constructs a Dummy ProgramInfo (used by GuideGrid)

Definition at line 281 of file programinfo.h.

◆ ProgramInfo() [13/14]

ProgramInfo::ProgramInfo ( QStringList::const_iterator &  it,
const QStringList::const_iterator &  end 
)
inline

Definition at line 286 of file programinfo.h.

◆ ProgramInfo() [14/14]

ProgramInfo::ProgramInfo ( const QStringList &  list)
inlineexplicit

Definition at line 292 of file programinfo.h.

◆ ~ProgramInfo()

virtual ProgramInfo::~ProgramInfo ( )
virtualdefault

Member Function Documentation

◆ operator==()

bool ProgramInfo::operator== ( const ProgramInfo rhs)

Compare two ProgramInfo instances to see if they are equal. Equal is defined as all parameters that are serialized and passed across the myth protocol are the same.

Parameters
rhsThe ProgramInfo instance to compare to the current instance.
Returns
True if all the serialized fields match, False otherwise.

Definition at line 1044 of file programinfo.cpp.

◆ operator=()

ProgramInfo & ProgramInfo::operator= ( const ProgramInfo other)

Copies important fields from other ProgramInfo.

Definition at line 826 of file programinfo.cpp.

◆ clone()

void ProgramInfo::clone ( const ProgramInfo other,
bool  ignore_non_serialized_data = false 
)
virtual

Copies important fields from other ProgramInfo.

Reimplemented in RecordingInfo, and ProgramRecPriorityInfo.

Definition at line 836 of file programinfo.cpp.

Referenced by RecordingInfo::clone(), PlaybackSock::FillProgramInfo(), operator=(), Reload(), and ProgramInfoCache::Update().

◆ ensureSortFields()

void ProgramInfo::ensureSortFields ( void  )

Ensure that the sortTitle and sortSubtitle fields are set.

Definition at line 1143 of file programinfo.cpp.

Referenced by FromStringList(), ProgramInfo(), SetSubtitle(), and SetTitle().

◆ clear()

void ProgramInfo::clear ( void  )
virtual

Reimplemented in RecordingInfo, and ProgramRecPriorityInfo.

Definition at line 932 of file programinfo.cpp.

Referenced by RecordingInfo::clear(), LoadProgramFromRecorded(), and ProgramInfo().

◆ ToStringList()

void ProgramInfo::ToStringList ( QStringList &  list) const

◆ ToMap()

void ProgramInfo::ToMap ( InfoMap progMap,
bool  showrerecord = false,
uint  star_range = 10,
uint  date_format = 0 
) const
virtual

◆ SubstituteMatches()

void ProgramInfo::SubstituteMatches ( QString &  str)
virtual

Subsitute MATCH% type variable names in the given string.

Parameters
strQString to substitute matches in
Note
This method sometimes initiates a QUERY_CHECKFILE MythProto call and so should not be called from the UI thread.

Reimplemented in RecordingInfo.

Definition at line 5463 of file programinfo.cpp.

Referenced by JobQueue::GetJobCommand(), and RecordingInfo::SubstituteMatches().

◆ IsSameProgram()

bool ProgramInfo::IsSameProgram ( const ProgramInfo other) const

Checks whether this is the same program as "other", which may or may not be a repeat or on another channel.

Matches based on programid with a fallback to dupmethod

Parameters
otherProgramInfo to compare this one with.

Definition at line 2251 of file programinfo.cpp.

Referenced by MainServer::HandleStopRecording(), PlayerContext::IsSameProgram(), and IsSameProgramAndStartTime().

◆ IsDuplicateProgram()

bool ProgramInfo::IsDuplicateProgram ( const ProgramInfo other) const

Checks for duplicates according to dupmethod.

Parameters
otherProgramInfo to compare this one with.

Definition at line 2182 of file programinfo.cpp.

Referenced by Scheduler::IsSameProgram().

◆ IsSameProgramAndStartTime()

bool ProgramInfo::IsSameProgramAndStartTime ( const ProgramInfo other) const

Match same program, with same starttime (channel may be different)

Parameters
otherProgramInfo to compare this one with.
Returns
true if this program is the same and shares same start time as "other" program.

Definition at line 2309 of file programinfo.cpp.

Referenced by ProgramInfo().

◆ IsSameTitleStartTimeAndChannel()

bool ProgramInfo::IsSameTitleStartTimeAndChannel ( const ProgramInfo other) const

Checks title, chanid or callsign and start times for equality.

Parameters
otherProgramInfo to compare this one with.
Returns
true if this program shares same time slot as "other" program.

Definition at line 2325 of file programinfo.cpp.

Referenced by Scheduler::ChangeRecordingEnd(), Scheduler::PruneOverlaps(), and Scheduler::PruneRedundants().

◆ IsSameTitleTimeslotAndChannel()

bool ProgramInfo::IsSameTitleTimeslotAndChannel ( const ProgramInfo other) const

Checks title, chanid or chansign, start/end times, cardid, inputid for fully inclusive overlap.

Parameters
otherProgramInfo to compare this one with.
Returns
true if this program is contained in time slot of "other" program.

Definition at line 2339 of file programinfo.cpp.

◆ UsingProgramIDAuthority()

static bool ProgramInfo::UsingProgramIDAuthority ( void  )
inlinestatic

Definition at line 324 of file programinfo.h.

Referenced by Scheduler::UpdateDuplicates().

◆ CheckProgramIDAuthorities()

void ProgramInfo::CheckProgramIDAuthorities ( void  )
static

Definition at line 2361 of file programinfo.cpp.

Referenced by handle_command(), and Scheduler::Scheduler().

◆ IsSameProgramWeakCheck()

bool ProgramInfo::IsSameProgramWeakCheck ( const ProgramInfo other) const

Checks for duplicate using only title, chanid and startts.

Parameters
otherProgramInfo to compare this one with.

Definition at line 2171 of file programinfo.cpp.

Referenced by TVRec::StartRecording().

◆ IsSameRecording()

bool ProgramInfo::IsSameRecording ( const ProgramInfo other) const
inline

Definition at line 332 of file programinfo.h.

Referenced by Scheduler::GetRecStatus(), and EncoderLink::MatchesRecording().

◆ IsSameChannel()

bool ProgramInfo::IsSameChannel ( const ProgramInfo other) const

Checks whether channel id or callsign are identical.

Parameters
otherProgramInfo to compare this one with.
Returns
true if this program's channel is likely to be the same as the "other" program's channel

Definition at line 2354 of file programinfo.cpp.

Referenced by IsSameProgramAndStartTime(), IsSameTitleStartTimeAndChannel(), IsSameTitleTimeslotAndChannel(), and ProgramInfo().

◆ MakeUniqueKey() [1/2]

QString ProgramInfo::MakeUniqueKey ( void  ) const
inline

◆ GetSecondsInRecording()

std::chrono::seconds ProgramInfo::GetSecondsInRecording ( void  ) const

Returns length of program/recording in seconds.

Definition at line 1879 of file programinfo.cpp.

Referenced by PlayerContext::SetPlayingInfo().

◆ ChannelText()

QString ProgramInfo::ChannelText ( const QString &  format) const

Returns channel info using "format".

There are three tags in "format" that will be replaced with the appropriate info. These tags are "<num>", "<sign>", and "<name>", they replaced with the channel number, channel call sign, and channel name, respectively.

Parameters
formatformatting string.
Returns
formatted string.

Definition at line 4946 of file programinfo.cpp.

Referenced by ProgramInfo(), and ToMap().

◆ GetPathname()

QString ProgramInfo::GetPathname ( void  ) const
inline

◆ GetBasename()

QString ProgramInfo::GetBasename ( void  ) const
inline

◆ IsVideoFile()

bool ProgramInfo::IsVideoFile ( void  ) const
inline

◆ IsVideoDVD()

bool ProgramInfo::IsVideoDVD ( void  ) const
inline

◆ IsVideoBD()

bool ProgramInfo::IsVideoBD ( void  ) const
inline

◆ IsLocal()

bool ProgramInfo::IsLocal ( void  ) const
inline

◆ IsMythStream()

bool ProgramInfo::IsMythStream ( void  ) const
inline

Definition at line 356 of file programinfo.h.

Referenced by IsFileReadable().

◆ IsPathSet()

bool ProgramInfo::IsPathSet ( void  ) const
inline

Definition at line 357 of file programinfo.h.

Referenced by PlaybackBox::Play().

◆ HasPathname()

bool ProgramInfo::HasPathname ( void  ) const
inline

◆ IsFileReadable()

bool ProgramInfo::IsFileReadable ( void  )

Attempts to ascertain if the main file for this ProgramInfo is readable.

Note
This method often initiates a QUERY_CHECKFILE MythProto call and so should not be called from the UI thread.
Returns
true iff file is readable

Definition at line 5021 of file programinfo.cpp.

Referenced by PBHEventHandler::CheckAvailability(), and TV::timerEvent().

◆ GetTitle()

QString ProgramInfo::GetTitle ( void  ) const
inline

Definition at line 361 of file programinfo.h.

Referenced by RecordingInfo::AddHistory(), Scheduler::AddNewRecords(), Scheduler::AddRecording(), Scheduler::AssignGroupInput(), RecordingRule::AssignProgramInfo(), ScheduledRecording::BuildCheckRequest(), comp_overlap(), comp_priority(), comp_redundant(), comp_retry(), RecordingExtender::create(), RecMetadataEdit::Create(), CreateProgramInfoString(), PlaybackBox::CreateProgramInfoString(), CustomEdit::CustomEdit(), ProgFinder::customEvent(), PrevRecordedList::DeleteOldSeries(), ProgLister::DeleteOldSeries(), StatusBox::doAutoExpireList(), MainServer::DoHandleDeleteRecording(), StatusBox::doJobQueueStatus(), StatusBox::doTunerStatus(), CustomEdit::evaluate(), MythBDPlayer::EventStart(), MythDVDPlayer::EventStart(), extract_subtitle(), FillProgramInfo(), HttpStatus::FillProgramInfo(), V2Status::FillProgramInfo(), GuideUpdateProgramRow::fillProgramRowInfosWith(), Scheduler::FindNextConflict(), TVRec::FinishedRecording(), FlagCommercials(), GuideGrid::gestureEvent(), PlayGroup::GetInitialName(), TV::GetStatus(), Scheduler::HandleRecording(), Scheduler::HandleWakeSlave(), GuideGrid::keyPressEvent(), RecordingRule::LoadByProgram(), CustomEdit::loadClauses(), CustomPriority::loadData(), ProgDetails::loadPage(), MetadataFactory::Lookup(), LookupFromProgramInfo(), TV::MenuItemDisplayPlayback(), print_comm_flag_output(), RecordingExtender::processNewRecordings(), TV::QuickRecord(), RebuildSeekTable(), CustomEdit::recordClicked(), RemoteGetExistingRecorder(), RemoteGetRecordingStatus(), Scheduler::SchedNewFirstPass(), PlayerContext::SetPseudoLiveTV(), PrevRecordedList::ShowDeleteOldEpisodeMenu(), ProgLister::ShowDeleteOldEpisodeMenu(), PrevRecordedList::ShowDeleteOldSeriesMenu(), ProgLister::ShowDeleteOldSeriesMenu(), TV::ShowLCDChannelInfo(), TV::ShowOSDPromptDeleteRecording(), ScheduleCommon::ShowPrevious(), PlaybackBox::ShowRecordedEpisodes(), ScheduleCommon::ShowUpcoming(), ScheduleCommon::ShowUpcomingScheduled(), TVRec::StartRecording(), TV::timerEvent(), TVRec::TuningRestartRecorder(), TVRec::TuningSignalCheck(), ProgramInfoCache::Update(), and V2FillProgramInfo().

◆ GetSortTitle()

QString ProgramInfo::GetSortTitle ( void  ) const
inline

◆ GetSubtitle()

QString ProgramInfo::GetSubtitle ( void  ) const
inline

◆ GetSortSubtitle()

QString ProgramInfo::GetSortSubtitle ( void  ) const
inline

◆ GetDescription()

QString ProgramInfo::GetDescription ( void  ) const
inline

◆ GetSeason()

uint ProgramInfo::GetSeason ( void  ) const
inline

◆ GetEpisode()

uint ProgramInfo::GetEpisode ( void  ) const
inline

◆ GetEpisodeTotal()

uint ProgramInfo::GetEpisodeTotal ( void  ) const
inline

Definition at line 368 of file programinfo.h.

Referenced by FillProgramInfo(), ProgDetails::loadPage(), and V2FillProgramInfo().

◆ GetCategory()

QString ProgramInfo::GetCategory ( void  ) const
inline

◆ GetChanID()

uint ProgramInfo::GetChanID ( void  ) const
inline

This is the unique key used in the database to locate tuning information.

[1..2^32] are valid keys, 0 is not.

Definition at line 372 of file programinfo.h.

Referenced by Dvr::AddRecordedCredits(), V2Dvr::AddRecordedCredits(), Content::AddRecordingLiveStream(), Dvr::AllowReRecord(), V2Dvr::AllowReRecord(), LiveTVChain::AppendNewProgram(), Scheduler::AssignGroupInput(), RecordingRule::AssignProgramInfo(), TVBrowseHelper::BrowseStart(), TV::ChangeChannel(), PBHEventHandler::CheckAvailability(), ClearBookmarks(), ClearSeekTable(), RecordingInfo::clone(), comp_overlap(), comp_priority(), comp_recstart(), comp_retry(), CompleteJob(), PlaybackBox::createJobMenu(), PlaybackBox::createPlaylistJobMenu(), MainServer::customEvent(), PlaybackBox::customEvent(), TV::customEvent(), commDetector2::debugDirectory(), PrevRecordedList::DeleteOldEpisode(), ProgLister::DeleteOldEpisode(), LiveTVChain::DeleteProgram(), Dvr::DeleteRecording(), V2Dvr::DeleteRecording(), MainServer::DoDeleteThread(), TV::DoEditSchedule(), DoFlagCommercials(), MainServer::DoHandleDeleteRecording(), PlaybackBox::doJobQueueJob(), StatusBox::doJobQueueStatus(), PlaybackBox::doPlaylistJobQueueJob(), TV::DoQueueTranscode(), StatusBox::doTunerStatus(), ScheduleCommon::EditRecording(), TV::Embed(), CustomEdit::evaluate(), PBHEventHandler::event(), MythPlayerUI::EventLoop(), PlaybackBox::extract_commflag_state(), PlaybackBox::extract_job_state(), FillCastMemberList(), HttpStatus::FillChannelInfo(), V2Status::FillChannelInfo(), FillCommBreak(), FillCutList(), FillProgramInfo(), FillSeek(), HttpStatus::FillStatusXML(), V2Status::FillStatusXML(), Scheduler::FindNextConflict(), LiveTVChain::FinishedRecording(), TVRec::FinishedRecording(), RecordingExtender::finishRecording(), FlagCommercials(), V2Status::GetBackendStatus(), GetPlaybackURL(), PlayerContext::GetPlayingInfoMap(), Content::GetPreviewImage(), V2Content::GetPreviewImage(), GetProgramInfo(), getProgramInfoForFile(), Content::GetRecording(), V2Content::GetRecording(), TV::GetStatus(), MainServer::HandleCutMapQuery(), MainServer::HandleDeleteRecording(), MainServer::HandleForgetRecording(), MainServer::HandleGetConflictingRecordings(), TV::HandlePseudoLiveTVTimerEvent(), MainServer::HandleQueryRecording(), Scheduler::HandleRecording(), Scheduler::HandleRecordingStatusChange(), MainServer::HandleSetBookmark(), MainServer::HandleStopRecording(), MainServer::HandleUndeleteRecording(), incomingCustomEvent(), init_jobs(), RecordingInfo::InsertProgram(), TVRec::IsBusy(), Scheduler::IsBusyRecording(), JobQueue::IsJobRunning(), EncoderLink::IsRecording(), TV::ITVRestart(), ProgDetails::loadPage(), FileServerHandler::LocalFilePath(), MainServer::LocalFilePath(), LookupFromProgramInfo(), main(), Dvr::ManageJobQueue(), V2Dvr::ManageJobQueue(), MythPlayer::OpenFile(), TV::PlaybackMenuInit(), Frontend::PlayRecording(), MythFrontendService::PlayRecording(), plTimeSort(), ProgDetails::PowerPriorities(), preview_helper(), print_comm_flag_output(), JobQueue::ProcessJob(), TV::ProcessNetworkControlCommand(), PlaybackBox::processNetworkControlCommand(), LiveTVChain::ProgramIsAt(), QueueCommFlagJob(), QueueJob(), JobQueue::QueueRecordingJobs(), QueueTranscodeJob(), TV::QuickRecord(), Dvr::ReactivateRecording(), V2Dvr::ReactivateRecording(), Reload(), ReloadBookmark(), RemoteDeleteRecording(), RemoteUndeleteRecording(), PreviewGenerator::Run(), TVBrowseHelper::run(), SendMythSystemPlayEvent(), SendMythSystemRecEvent(), TVRec::SetLiveRecording(), LiveTVChain::SetProgram(), RecorderBase::SetRecordingStatus(), ScheduleCommon::ShowChannelSearch(), ProgFinder::ShowGuide(), ScheduleCommon::ShowGuide(), ViewScheduleDiff::showStatus(), ScheduleCommon::ShowUpcoming(), EncoderLink::StartRecording(), TVRec::StartRecording(), TV::StartTV(), PlaybackBox::stopPlaylistJobQueueJob(), Dvr::StopRecording(), V2Dvr::StopRecording(), MythSystemEventHandler::SubstituteMatches(), TVRec::SwitchRecordingRingBuffer(), toString(), TVRec::TuningNewRecorder(), TVRec::TuningRestartRecorder(), TVRec::TuningSignalCheck(), Dvr::UnDeleteRecording(), V2Dvr::UnDeleteRecording(), Dvr::UpdateRecordedWatchedStatus(), V2Dvr::UpdateRecordedWatchedStatus(), V2FillCastMemberList(), V2FillCutList(), V2FillProgramInfo(), V2FillSeek(), and WaitToDelete().

◆ GetChanNum()

QString ProgramInfo::GetChanNum ( void  ) const
inline

◆ GetChannelSchedulingID()

QString ProgramInfo::GetChannelSchedulingID ( void  ) const
inline

This is the unique programming identifier of a channel.

For example "BBC1 Crystal Palace". The channel may be broadcast over satelite, cable and terrestrially – but will almost always contain the same programming. This is used when determining if two channels can be treated as the same channel in recording rules. In the DB this is called 'callsign' for historic reasons.

Definition at line 383 of file programinfo.h.

Referenced by Scheduler::AddNewRecords(), Scheduler::AssignGroupInput(), RecordingRule::AssignProgramInfo(), comp_recstart(), comp_redundant(), CustomEdit::evaluate(), HttpStatus::FillChannelInfo(), V2Status::FillChannelInfo(), CustomEdit::loadClauses(), ViewScheduled::LoadList(), LookupFromProgramInfo(), MythPlayer::OpenFile(), and TV::ShowLCDChannelInfo().

◆ GetChannelName()

QString ProgramInfo::GetChannelName ( void  ) const
inline

This is the channel name in the local market, i.e.

BBC1. This is purely for use in the user interface.

Definition at line 386 of file programinfo.h.

Referenced by StatusBox::doJobQueueStatus(), CustomEdit::evaluate(), HttpStatus::FillChannelInfo(), V2Status::FillChannelInfo(), LookupFromProgramInfo(), and RemoteGetRecordingStatus().

◆ GetChannelPlaybackFilters()

QString ProgramInfo::GetChannelPlaybackFilters ( void  ) const
inline

◆ GetScheduledStartTime() [1/2]

QDateTime ProgramInfo::GetScheduledStartTime ( void  ) const
inline

The scheduled start time of program.

Definition at line 390 of file programinfo.h.

Referenced by RecordingInfo::AddHistory(), Scheduler::AddNewRecords(), Dvr::AddRecordedCredits(), V2Dvr::AddRecordedCredits(), RecordingRule::AssignProgramInfo(), TVBrowseHelper::BrowseStart(), ClearBookmarks(), ClearSeekTable(), RecordingInfo::clone(), comp_originalAirDate(), comp_originalAirDate_rev(), comp_overlap(), comp_recordDate(), comp_recordDate_rev(), comp_redundant(), RecordingExtender::create(), PrevRecordedList::DeleteOldEpisode(), ProgLister::DeleteOldEpisode(), DoFlagCommercials(), CustomEdit::evaluate(), FillCastMemberList(), FillProgramInfo(), HttpStatus::FillProgramInfo(), V2Status::FillProgramInfo(), GuideUpdateProgramRow::fillProgramRowInfosWith(), TVRec::FinishedRecording(), GuideGrid::gestureEvent(), get_start(), TVBrowseHelper::GetNextProgramDB(), GuideGrid::keyPressEvent(), RecordingRule::LoadBySearch(), ViewScheduled::LoadList(), ProgDetails::loadPage(), PreviewGenerator::LocalPreviewRun(), LookupFromProgramInfo(), TV::PlaybackMenuInit(), plPrevTitleSort(), plTimeSort(), plTitleSort(), ProgDetails::PowerPriorities(), TV::ProcessNetworkControlCommand(), RecordingInfo::RecordingInfo(), RemoteGetRecordingStatus(), TVRec::SetLiveRecording(), RecorderBase::SetRecording(), RecorderBase::SetRecordingStatus(), ScheduleCommon::ShowChannelSearch(), ProgFinder::ShowGuide(), ScheduleCommon::ShowGuide(), toString(), Scheduler::TryAnotherShowing(), TVRec::TuningNewRecorder(), TVRec::TuningSignalCheck(), V2FillCastMemberList(), and V2FillProgramInfo().

◆ GetScheduledStartTime() [2/2]

QString ProgramInfo::GetScheduledStartTime ( MythDate::Format  fmt) const
inline

The scheduled start time of program (with formatting).

Definition at line 392 of file programinfo.h.

◆ GetScheduledEndTime() [1/2]

QDateTime ProgramInfo::GetScheduledEndTime ( void  ) const
inline

◆ GetScheduledEndTime() [2/2]

QString ProgramInfo::GetScheduledEndTime ( MythDate::Format  fmt) const
inline

The scheduled end time of the program (with formatting).

Definition at line 399 of file programinfo.h.

◆ GetRecordingStartTime() [1/2]

QDateTime ProgramInfo::GetRecordingStartTime ( void  ) const
inline

Approximate time the recording started.

Definition at line 404 of file programinfo.h.

Referenced by LiveTVChain::AppendNewProgram(), RecordingInfo::ApplyNeverRecord(), Scheduler::AssignGroupInput(), RecordingInfo::clone(), comp_originalAirDate(), comp_originalAirDate_rev(), comp_priority(), comp_programid(), comp_programid_rev(), comp_recordDate(), comp_recordDate_rev(), comp_recpriority2(), comp_recstart(), comp_retry(), comp_sortdate_lt(), comp_sortdate_lt_rev(), CompleteJob(), PlaybackBox::createJobMenu(), PlaybackBox::createPlaylistJobMenu(), CreateProgramInfoString(), PlaybackBox::CreateProgramInfoString(), TV::customEvent(), LiveTVChain::DeleteProgram(), Dvr::DeleteRecording(), V2Dvr::DeleteRecording(), StatusBox::doAutoExpireList(), DoFlagCommercials(), MainServer::DoHandleDeleteRecording(), PlaybackBox::doJobQueueJob(), StatusBox::doJobQueueStatus(), PlaybackBox::doPlaylistJobQueueJob(), TV::DoQueueTranscode(), ScheduleCommon::EditRecording(), PlaybackBox::extract_commflag_state(), PlaybackBox::extract_job_state(), FillProgramInfo(), HttpStatus::FillProgramInfo(), V2Status::FillProgramInfo(), Scheduler::FindNextConflict(), LiveTVChain::FinishedRecording(), TVRec::FinishedRecording(), RecordingExtender::finishRecording(), PreviewGeneratorQueue::GeneratePreviewImage(), GetPlaybackURL(), TVRec::GetProgramRingBufferForLiveTV(), TV::GetStatus(), Scheduler::HandleRecording(), Scheduler::HandleRecordingStatusChange(), MainServer::HandleRemoteEncoder(), Scheduler::HandleWakeSlave(), incomingCustomEvent(), init_jobs(), JobQueue::IsJobRunning(), EncoderLink::IsRecording(), ViewScheduled::LoadList(), ProgDetails::loadPage(), PreviewGenerator::LocalPreviewRun(), LookupFromProgramInfo(), main(), Dvr::ManageJobQueue(), V2Dvr::ManageJobQueue(), Frontend::PlayRecording(), MythFrontendService::PlayRecording(), print_comm_flag_output(), TV::ProcessNetworkControlCommand(), LiveTVChain::ProgramIsAt(), QueueCommFlagJob(), QueueJob(), JobQueue::QueueRecordingJobs(), QueueTranscodeJob(), ReloadBookmark(), RemoteDeleteRecording(), RemoteUndeleteRecording(), PreviewGenerator::Run(), Scheduler::SchedNewFirstPass(), SendMythSystemPlayEvent(), SendMythSystemRecEvent(), PlayerContext::SetPlayingInfo(), LiveTVChain::SetProgram(), PlayerContext::SetPseudoLiveTV(), MythPlayerUI::SetWatched(), ViewScheduleDiff::showStatus(), Scheduler::ShutdownServer(), EncoderLink::StartRecording(), TVRec::StartRecording(), PlaybackBox::stopPlaylistJobQueueJob(), Dvr::StopRecording(), V2Dvr::StopRecording(), ToMap(), toString(), Scheduler::TryAnotherShowing(), TVRec::TuningRestartRecorder(), Dvr::UnDeleteRecording(), V2Dvr::UnDeleteRecording(), V2FillProgramInfo(), WaitToDelete(), and EncoderLink::WouldConflict().

◆ GetRecordingStartTime() [2/2]

QString ProgramInfo::GetRecordingStartTime ( MythDate::Format  fmt) const
inline

Approximate time the recording started (with formatting).

Definition at line 406 of file programinfo.h.

◆ GetRecordingEndTime() [1/2]

QDateTime ProgramInfo::GetRecordingEndTime ( void  ) const
inline

◆ GetRecordingEndTime() [2/2]

QString ProgramInfo::GetRecordingEndTime ( MythDate::Format  fmt) const
inline

Approximate time the recording should have ended, did end, or is intended to end (with formatting).

Definition at line 415 of file programinfo.h.

◆ GetRecordingGroup()

QString ProgramInfo::GetRecordingGroup ( void  ) const
inline

◆ GetPlaybackGroup()

QString ProgramInfo::GetPlaybackGroup ( void  ) const
inline

◆ GetHostname()

QString ProgramInfo::GetHostname ( void  ) const
inline

◆ GetStorageGroup()

QString ProgramInfo::GetStorageGroup ( void  ) const
inline

◆ GetYearOfInitialRelease()

uint ProgramInfo::GetYearOfInitialRelease ( void  ) const
inline

◆ GetOriginalAirDate()

QDate ProgramInfo::GetOriginalAirDate ( void  ) const
inline

◆ GetLastModifiedTime() [1/2]

QDateTime ProgramInfo::GetLastModifiedTime ( void  ) const
inline

◆ GetLastModifiedTime() [2/2]

QString ProgramInfo::GetLastModifiedTime ( MythDate::Format  fmt) const
inline

Definition at line 430 of file programinfo.h.

◆ GetFilesize()

uint64_t ProgramInfo::GetFilesize ( void  ) const
virtual

◆ GetSeriesID()

QString ProgramInfo::GetSeriesID ( void  ) const
inline

◆ GetProgramID()

QString ProgramInfo::GetProgramID ( void  ) const
inline

◆ GetInetRef()

QString ProgramInfo::GetInetRef ( void  ) const
inline

◆ GetCategoryType()

CategoryType ProgramInfo::GetCategoryType ( void  ) const
inline

◆ GetCategoryTypeString()

QString ProgramInfo::GetCategoryTypeString ( void  ) const

◆ GetRecordingPriority()

int ProgramInfo::GetRecordingPriority ( void  ) const
inline

◆ GetRecordingPriority2()

int ProgramInfo::GetRecordingPriority2 ( void  ) const
inline

◆ GetStars() [1/2]

float ProgramInfo::GetStars ( void  ) const
inline

◆ GetStars() [2/2]

uint ProgramInfo::GetStars ( uint  range_max) const
inline

Definition at line 443 of file programinfo.h.

◆ GetRecordingID()

uint ProgramInfo::GetRecordingID ( void  ) const
inline

◆ GetRecordingStatus()

RecStatus::Type ProgramInfo::GetRecordingStatus ( void  ) const
inline

◆ GetRecordingRuleID()

uint ProgramInfo::GetRecordingRuleID ( void  ) const
inline

◆ GetParentRecordingRuleID()

uint ProgramInfo::GetParentRecordingRuleID ( void  ) const
inline

◆ GetRecordingRuleType()

RecordingType ProgramInfo::GetRecordingRuleType ( void  ) const
inline

◆ GetDuplicateCheckSource()

RecordingDupInType ProgramInfo::GetDuplicateCheckSource ( void  ) const
inline

Where should we check for duplicates?

Definition at line 455 of file programinfo.h.

Referenced by FillProgramInfo(), HttpStatus::FillProgramInfo(), V2Status::FillProgramInfo(), and V2FillProgramInfo().

◆ GetDuplicateCheckMethod()

RecordingDupMethodType ProgramInfo::GetDuplicateCheckMethod ( void  ) const
inline

What should be compared to determine if two programs are the same?

Definition at line 459 of file programinfo.h.

Referenced by ScheduleCommon::EditRecording(), FillProgramInfo(), HttpStatus::FillProgramInfo(), V2Status::FillProgramInfo(), and V2FillProgramInfo().

◆ GetSourceID()

uint ProgramInfo::GetSourceID ( void  ) const
inline

◆ GetInputID()

uint ProgramInfo::GetInputID ( void  ) const
inline

◆ GetInputName()

QString ProgramInfo::GetInputName ( void  ) const
inline

◆ GetShortInputName()

QString ProgramInfo::GetShortInputName ( void  ) const

Definition at line 1913 of file programinfo.cpp.

Referenced by ToMap().

◆ ClearInputName()

void ProgramInfo::ClearInputName ( void  )
inline

Definition at line 466 of file programinfo.h.

◆ GetFindID()

uint ProgramInfo::GetFindID ( void  ) const
inline

◆ GetProgramFlags()

uint32_t ProgramInfo::GetProgramFlags ( void  ) const
inline

◆ GetProgramFlagNames()

QString ProgramInfo::GetProgramFlagNames ( void  ) const

Definition at line 1498 of file programinfo.cpp.

Referenced by FillProgramInfo(), ToMap(), and V2FillProgramInfo().

◆ GetProgramInfoType()

ProgramInfoType ProgramInfo::GetProgramInfoType ( void  ) const
inline

Definition at line 472 of file programinfo.h.

Referenced by ToMap().

◆ GetBookmarkUpdate()

QDateTime ProgramInfo::GetBookmarkUpdate ( void  ) const
inline

◆ IsGeneric()

bool ProgramInfo::IsGeneric ( void  ) const

Definition at line 1925 of file programinfo.cpp.

Referenced by RecordingInfo::AddHistory(), and ScheduleCommon::EditRecording().

◆ IsInUsePlaying()

bool ProgramInfo::IsInUsePlaying ( void  ) const
inline

Definition at line 476 of file programinfo.h.

Referenced by PlaybackBox::SetItemIcons().

◆ IsCommercialFree()

bool ProgramInfo::IsCommercialFree ( void  ) const
inline

◆ IsCommercialFlagged()

bool ProgramInfo::IsCommercialFlagged ( void  ) const
inline

Definition at line 478 of file programinfo.h.

Referenced by Dvr::AddRecordedProgram(), and V2Dvr::AddRecordedProgram().

◆ HasCutlist()

bool ProgramInfo::HasCutlist ( void  ) const
inline

◆ IsBookmarkSet()

bool ProgramInfo::IsBookmarkSet ( void  ) const
inline

◆ IsLastPlaySet()

bool ProgramInfo::IsLastPlaySet ( void  ) const
inline

Definition at line 481 of file programinfo.h.

Referenced by PlaybackBox::createPlayFromMenu(), and PlaybackBox::ShowActionPopup().

◆ IsWatched()

bool ProgramInfo::IsWatched ( void  ) const
inline

◆ IsAutoExpirable()

bool ProgramInfo::IsAutoExpirable ( void  ) const
inline

◆ IsPreserved()

bool ProgramInfo::IsPreserved ( void  ) const
inline

◆ IsVideo()

bool ProgramInfo::IsVideo ( void  ) const
inline

◆ IsRecording()

bool ProgramInfo::IsRecording ( void  ) const
inline

◆ IsRepeat()

bool ProgramInfo::IsRepeat ( void  ) const
inline

◆ IsDuplicate()

bool ProgramInfo::IsDuplicate ( void  ) const
inline

◆ IsReactivated()

bool ProgramInfo::IsReactivated ( void  ) const
inline

Definition at line 489 of file programinfo.h.

Referenced by comp_priority(), comp_retry(), and RecordingInfo::SubstituteMatches().

◆ IsDeletePending()

bool ProgramInfo::IsDeletePending ( void  ) const
inline

Definition at line 490 of file programinfo.h.

◆ GetSubtitleType()

uint ProgramInfo::GetSubtitleType ( void  ) const
inline

◆ GetSubtitleTypeNames()

QString ProgramInfo::GetSubtitleTypeNames ( void  ) const

Definition at line 1503 of file programinfo.cpp.

Referenced by FillProgramInfo(), ToMap(), and V2FillProgramInfo().

◆ GetVideoProperties()

uint ProgramInfo::GetVideoProperties ( void  ) const
inline

◆ GetVideoPropertyNames()

QString ProgramInfo::GetVideoPropertyNames ( void  ) const

Definition at line 1509 of file programinfo.cpp.

Referenced by FillProgramInfo(), ToMap(), and V2FillProgramInfo().

◆ GetAudioProperties()

uint ProgramInfo::GetAudioProperties ( void  ) const
inline

◆ GetAudioPropertyNames()

QString ProgramInfo::GetAudioPropertyNames ( void  ) const

Definition at line 1514 of file programinfo.cpp.

Referenced by FillProgramInfo(), ToMap(), and V2FillProgramInfo().

◆ SubtitleTypesFromNames()

uint ProgramInfo::SubtitleTypesFromNames ( const QString &  names)
static

Definition at line 1519 of file programinfo.cpp.

Referenced by Dvr::AddRecordedProgram(), and V2Dvr::AddRecordedProgram().

◆ VideoPropertiesFromNames()

uint ProgramInfo::VideoPropertiesFromNames ( const QString &  names)
static

Definition at line 1524 of file programinfo.cpp.

Referenced by Dvr::AddRecordedProgram(), and V2Dvr::AddRecordedProgram().

◆ AudioPropertiesFromNames()

uint ProgramInfo::AudioPropertiesFromNames ( const QString &  names)
static

Definition at line 1529 of file programinfo.cpp.

Referenced by Dvr::AddRecordedProgram(), and V2Dvr::AddRecordedProgram().

◆ ProgramFlagsFromNames()

void ProgramInfo::ProgramFlagsFromNames ( const QString &  names)

Definition at line 1534 of file programinfo.cpp.

Referenced by Dvr::AddRecordedProgram(), and V2Dvr::AddRecordedProgram().

◆ toString()

QString ProgramInfo::toString ( Verbosity  v = kLongDescription,
const QString &  sep = ":",
const QString &  grp = "\"" 
) const

◆ SetTitle()

void ProgramInfo::SetTitle ( const QString &  t,
const QString &  st = nullptr 
)

◆ SetSubtitle()

void ProgramInfo::SetSubtitle ( const QString &  st,
const QString &  sst = nullptr 
)

Definition at line 1160 of file programinfo.cpp.

Referenced by ProgramRecPriority::scheduleChanged().

◆ SetProgramInfoType()

void ProgramInfo::SetProgramInfoType ( ProgramInfoType  t)
inline

Definition at line 519 of file programinfo.h.

Referenced by SetPathname().

◆ SetPathname()

void ProgramInfo::SetPathname ( const QString &  pn)

◆ SetChanID()

void ProgramInfo::SetChanID ( uint  _chanid)
inline

◆ SetScheduledStartTime()

void ProgramInfo::SetScheduledStartTime ( const QDateTime &  dt)
inline

Definition at line 523 of file programinfo.h.

Referenced by RecordingInfo::ApplyNeverRecord().

◆ SetScheduledEndTime()

void ProgramInfo::SetScheduledEndTime ( const QDateTime &  dt)
inline

◆ SetRecordingStartTime()

void ProgramInfo::SetRecordingStartTime ( const QDateTime &  dt)
inline

◆ SetRecordingEndTime()

void ProgramInfo::SetRecordingEndTime ( const QDateTime &  dt)
inline

◆ SetRecordingGroup()

void ProgramInfo::SetRecordingGroup ( const QString &  group)
inline

◆ SetPlaybackGroup()

void ProgramInfo::SetPlaybackGroup ( const QString &  group)
inline

Definition at line 528 of file programinfo.h.

◆ SetHostname()

void ProgramInfo::SetHostname ( const QString &  host)
inline

Definition at line 529 of file programinfo.h.

◆ SetStorageGroup()

void ProgramInfo::SetStorageGroup ( const QString &  group)
inline

Definition at line 530 of file programinfo.h.

Referenced by TVRec::GetProgramRingBufferForLiveTV().

◆ SetFilesize()

void ProgramInfo::SetFilesize ( uint64_t  sz)
virtual

◆ SetSeriesID()

void ProgramInfo::SetSeriesID ( const QString &  id)
inline

TODO Move to RecordingInfo.

Definition at line 532 of file programinfo.h.

◆ SetProgramID()

void ProgramInfo::SetProgramID ( const QString &  id)
inline

◆ SetCategory()

void ProgramInfo::SetCategory ( const QString &  cat)
inline

Definition at line 534 of file programinfo.h.

Referenced by ProgramRecPriority::scheduleChanged().

◆ SetCategoryType()

void ProgramInfo::SetCategoryType ( const CategoryType  type)
inline

Definition at line 535 of file programinfo.h.

◆ SetRecordingPriority()

void ProgramInfo::SetRecordingPriority ( int  priority)
inline

Definition at line 536 of file programinfo.h.

Referenced by ProgramRecPriority::scheduleChanged().

◆ SetRecordingPriority2()

void ProgramInfo::SetRecordingPriority2 ( int  priority)
inline

Definition at line 537 of file programinfo.h.

Referenced by Scheduler::PruneRedundants().

◆ SetRecordingRuleID()

void ProgramInfo::SetRecordingRuleID ( uint  id)
inline

◆ SetSourceID()

void ProgramInfo::SetSourceID ( uint  id)
inline

Definition at line 539 of file programinfo.h.

◆ SetInputID()

void ProgramInfo::SetInputID ( uint  id)
inline

◆ SetReactivated()

void ProgramInfo::SetReactivated ( bool  reactivate)
inline

Definition at line 541 of file programinfo.h.

Referenced by RecordingInfo::AddHistory().

◆ SetEditing()

void ProgramInfo::SetEditing ( bool  editing)
inline

◆ SetFlagging()

void ProgramInfo::SetFlagging ( bool  flagging)
inline

◆ SetIgnoreBookmark()

void ProgramInfo::SetIgnoreBookmark ( bool  ignore)
inline

If "ignore" is true GetBookmark() will return 0, otherwise GetBookmark() will return the bookmark position if it exists.

Definition at line 558 of file programinfo.h.

Referenced by MythPlayerUI::EventStart(), and TV::StartTV().

◆ SetIgnoreProgStart()

void ProgramInfo::SetIgnoreProgStart ( bool  ignore)
inline

If "ignore" is true QueryProgStart() will return 0, otherwise QueryProgStart() will return the progstart position if it exists.

Definition at line 565 of file programinfo.h.

Referenced by MythPlayerUI::EventStart(), PreviewGenerator::LocalPreviewRun(), and TV::StartTV().

◆ SetIgnoreLastPlayPos()

void ProgramInfo::SetIgnoreLastPlayPos ( bool  ignore)
inline

If "ignore" is true QueryLastPlayPos() will return 0, otherwise QueryLastPlayPos() will return the last playback position if it exists.

Definition at line 573 of file programinfo.h.

Referenced by MythPlayerUI::EventStart(), and TV::StartTV().

◆ SetRecordingID()

virtual void ProgramInfo::SetRecordingID ( uint  _recordedid)
inlinevirtual

Reimplemented in RecordingInfo.

Definition at line 578 of file programinfo.h.

Referenced by PlaybackSock::StartRecording(), and TVRec::StartRecording().

◆ SetRecordingStatus()

void ProgramInfo::SetRecordingStatus ( RecStatus::Type  status)
inline

◆ SetRecordingRuleType()

void ProgramInfo::SetRecordingRuleType ( RecordingType  type)
inline

◆ SetPositionMapDBReplacement()

void ProgramInfo::SetPositionMapDBReplacement ( PMapDBReplacement pmap)
inline

Definition at line 582 of file programinfo.h.

◆ CalculateRecordedProgress()

void ProgramInfo::CalculateRecordedProgress ( )

◆ GetRecordedPercent()

uint ProgramInfo::GetRecordedPercent ( ) const
inline

Definition at line 586 of file programinfo.h.

Referenced by ViewScheduled::customEvent(), and ViewScheduled::UpdateUIListItem().

◆ CalculateWatchedProgress()

void ProgramInfo::CalculateWatchedProgress ( uint64_t  pos)

Definition at line 6472 of file programinfo.cpp.

Referenced by CalculateProgress().

◆ GetWatchedPercent()

uint ProgramInfo::GetWatchedPercent ( ) const
inline

Definition at line 588 of file programinfo.h.

◆ SetWatchedPercent()

void ProgramInfo::SetWatchedPercent ( uint  progress)
inline

Definition at line 589 of file programinfo.h.

◆ CalculateProgress()

void ProgramInfo::CalculateProgress ( uint64_t  pos)

Definition at line 6529 of file programinfo.cpp.

Referenced by ProgramInfoCache::UpdateFileSize().

◆ QueryBasename()

QString ProgramInfo::QueryBasename ( void  ) const

Gets the basename, from the DB if necessary.

If the base part of pathname is not empty this will return that value otherwise this queries the recorded table in the DB for the basename stored there for this ProgramInfo's recordedid

Definition at line 2508 of file programinfo.cpp.

Referenced by CompleteJob(), and GetPlaybackURL().

◆ QueryMplexID()

uint ProgramInfo::QueryMplexID ( void  ) const

Queries multiplex any recording would be made on, zero if unknown.

Definition at line 2644 of file programinfo.cpp.

Referenced by TVRec::StartRecording().

◆ QueryBookmarkTimeStamp()

QDateTime ProgramInfo::QueryBookmarkTimeStamp ( void  ) const

Queries Latest bookmark timestamp from the database.

If the timestamp has not been set this returns an invalid QDateTime.

Definition at line 2766 of file programinfo.cpp.

◆ QueryBookmark() [1/2]

uint64_t ProgramInfo::QueryBookmark ( void  ) const

Gets any bookmark position in database, unless the ignore bookmark flag is set.

Returns
Bookmark position in frames if the query is executed and succeeds, zero otherwise.

Definition at line 2793 of file programinfo.cpp.

Referenced by V2Video::GetSavedBookmark(), Dvr::GetSavedBookmark(), Video::GetSavedBookmark(), V2Dvr::GetSavedBookmark(), MainServer::HandleBookmarkQuery(), and QueryStartMark().

◆ QueryProgStart()

uint64_t ProgramInfo::QueryProgStart ( void  ) const

Gets any progstart position in database, unless the ignore progstart flag is set.

Returns
Progstart position in frames if the query is executed and succeeds, zero otherwise.

Definition at line 2837 of file programinfo.cpp.

Referenced by QueryStartMark().

◆ QueryLastPlayPos()

uint64_t ProgramInfo::QueryLastPlayPos ( void  ) const

Gets any lastplaypos position in database, unless the ignore lastplaypos flag is set.

Returns
LastPlayPos position in frames if the query is executed and succeeds, zero otherwise.

Definition at line 2820 of file programinfo.cpp.

Referenced by V2Video::GetLastPlayPos(), V2Dvr::GetLastPlayPos(), QueryStartMark(), and ProgramInfoCache::UpdateFileSize().

◆ QueryStartMark()

uint64_t ProgramInfo::QueryStartMark ( void  ) const

Definition at line 2848 of file programinfo.cpp.

Referenced by PreviewGenerator::LocalPreviewRun().

◆ QueryCategoryType()

ProgramInfo::CategoryType ProgramInfo::QueryCategoryType ( void  ) const

Queries recordedprogram to get the category_type of the recording.

Returns
string category_type

Definition at line 3021 of file programinfo.cpp.

Referenced by GuessLookupType().

◆ QueryDVDBookmark()

QStringList ProgramInfo::QueryDVDBookmark ( const QString &  serialid) const

Queries "dvdbookmark" table for bookmarking DVD serial number.

Deletes old dvd bookmarks if "delbookmark" is set.

Returns
list containing title, audio track, subtitle, framenum

Definition at line 2880 of file programinfo.cpp.

Referenced by MythDVDPlayer::GetBookmark().

◆ QueryBDBookmark()

QStringList ProgramInfo::QueryBDBookmark ( const QString &  serialid) const

Queries "bdbookmark" table for bookmarking BD serial number.

Returns
BD state string

Definition at line 2957 of file programinfo.cpp.

Referenced by MythBDPlayer::GetBookmark().

◆ QueryIsEditing()

bool ProgramInfo::QueryIsEditing ( void  ) const

Queries "recorded" table for its "editing" field and returns true if it is set to true.

Returns
true if we have started, but not finished, editing.

Definition at line 3096 of file programinfo.cpp.

Referenced by DeleteMap::IsFileEditing(), TV::StartProgramEditMode(), and Transcode::TranscodeFile().

◆ QueryIsInUse() [1/2]

bool ProgramInfo::QueryIsInUse ( QStringList &  byWho) const

Returns true if Program is in use.

This is determined by the inuseprograms table which is updated automatically by NuppelVideoPlayer.

Definition at line 3175 of file programinfo.cpp.

Referenced by QueryIsDeleteCandidate(), QueryIsInUse(), PlaybackBox::ShowAvailabilityPopup(), TV::ShowOSDPromptDeleteRecording(), and ProgramInfoCache::UpdateFileSize().

◆ QueryIsInUse() [2/2]

bool ProgramInfo::QueryIsInUse ( QString &  byWho) const

Returns true if Program is in use.

This is determined by the inuseprograms table which is updated automatically by NuppelVideoPlayer.

Definition at line 3238 of file programinfo.cpp.

◆ QueryIsDeleteCandidate()

bool ProgramInfo::QueryIsDeleteCandidate ( bool  one_playback_allowed = false) const

Returns true iff this is a recording, it is not in use (except by the recorder), and at most one player iff one_playback_allowed is set.

Parameters
one_playback_allowediff true still returns true if there is one playback in progress and all other checks pass.

Definition at line 3255 of file programinfo.cpp.

Referenced by TV::IsDeleteAllowed(), PlaybackBox::PlaylistDelete(), PlaybackBox::RemoveProgram(), and TV::ShowOSDPromptDeleteRecording().

◆ QueryAutoExpire()

AutoExpireType ProgramInfo::QueryAutoExpire ( void  ) const

Returns "autoexpire" field from "recorded" table.

Definition at line 3441 of file programinfo.cpp.

Referenced by TV::IsBookmarkAllowed(), MythPlayer::OpenFile(), TV::PlaybackMenuInit(), TV::QuickRecord(), PlaybackBox::ShowDeletePopup(), and TV::ToggleAutoExpire().

◆ QueryTranscodeStatus()

TranscodingStatus ProgramInfo::QueryTranscodeStatus ( void  ) const

Returns the "transcoded" field in "recorded" table.

Definition at line 3290 of file programinfo.cpp.

Referenced by MythPlayerUI::SetWatched().

◆ QueryTuningInfo()

bool ProgramInfo::QueryTuningInfo ( QString &  channum,
QString &  input 
) const

Returns the channel and input needed to record the program.

Note
Ideally this would return a the chanid & input, since we do not enforce a uniqueness constraint on channum in the DB.
Returns
true on success, false on failure

Definition at line 5339 of file programinfo.cpp.

Referenced by TVRec::IsBusy(), and TVRec::TuningGetChanNum().

◆ QueryInputDisplayName()

QString ProgramInfo::QueryInputDisplayName ( void  ) const

◆ QueryAverageWidth()

uint ProgramInfo::QueryAverageWidth ( void  ) const

If present in recording this loads average width of the main video stream from database's stream markup table.

Note
Saves loaded value for future reference by GetWidth().

Definition at line 4528 of file programinfo.cpp.

Referenced by RecorderBase::FinishRecording().

◆ QueryAverageHeight()

uint ProgramInfo::QueryAverageHeight ( void  ) const

If present in recording this loads average height of the main video stream from database's stream markup table.

Note
Saves loaded value for future reference by GetHeight().

Definition at line 4519 of file programinfo.cpp.

Referenced by TVRec::FinishedRecording(), and RecorderBase::FinishRecording().

◆ QueryAverageFrameRate()

uint ProgramInfo::QueryAverageFrameRate ( void  ) const

If present in recording this loads average frame rate of the main video stream from database's stream markup table.

Note
Saves loaded value for future reference by GetFrameRate().

Definition at line 4537 of file programinfo.cpp.

Referenced by CalculateWatchedProgress(), and RecorderBase::FinishRecording().

◆ QueryAverageAspectRatio()

MarkTypes ProgramInfo::QueryAverageAspectRatio ( void  ) const

Definition at line 4542 of file programinfo.cpp.

Referenced by TVRec::FinishedRecording(), and RecorderBase::FinishRecording().

◆ QueryAverageScanProgressive()

bool ProgramInfo::QueryAverageScanProgressive ( void  ) const

If present in recording this loads average video scan type of the main video stream from database's stream markup table.

Note
Saves loaded value for future reference by QueryAverageScanProgressive().

Definition at line 4592 of file programinfo.cpp.

Referenced by TVRec::FinishedRecording().

◆ QueryTotalDuration()

std::chrono::milliseconds ProgramInfo::QueryTotalDuration ( void  ) const

If present this loads the total duration in milliseconds of the main video stream from recordedmarkup table in the database.

Returns
Duration in milliseconds

Definition at line 4603 of file programinfo.cpp.

Referenced by UPnpCDSTv::LoadRecordings(), and AvFormatDecoder::OpenFile().

◆ QueryTotalFrames()

int64_t ProgramInfo::QueryTotalFrames ( void  ) const

If present in recording this loads total frames of the main video stream from database's stream markup table.

Definition at line 4620 of file programinfo.cpp.

Referenced by CalculateWatchedProgress(), and TV::PrepareToExitPlayer().

◆ QueryRecordingGroup()

QString ProgramInfo::QueryRecordingGroup ( void  ) const

Query recgroup from recorded.

Definition at line 5055 of file programinfo.cpp.

Referenced by TVRec::CheckForRecGroupChange(), and TVRec::FinishedRecording().

◆ QueryMarkupFlag()

bool ProgramInfo::QueryMarkupFlag ( MarkTypes  type) const

Returns true iff the speficied mark type is set on frame 0.

Definition at line 3737 of file programinfo.cpp.

Referenced by Transcode::TranscodeFile().

◆ QueryTranscoderID()

uint ProgramInfo::QueryTranscoderID ( void  ) const

Definition at line 5071 of file programinfo.cpp.

Referenced by JobQueue::DoTranscodeThread(), and JobQueue::GetJobCommand().

◆ QueryLastFrameInPosMap()

uint64_t ProgramInfo::QueryLastFrameInPosMap ( void  ) const

Returns last frame in position map or 0.

Definition at line 1893 of file programinfo.cpp.

Referenced by GetMarkupList().

◆ Reload()

bool ProgramInfo::Reload ( void  )

Definition at line 1971 of file programinfo.cpp.

Referenced by JobQueue::DoTranscodeThread().

◆ SaveFilesize()

void ProgramInfo::SaveFilesize ( uint64_t  fsize)
virtual

Sets recording file size in database, and sets "filesize" field.

Reimplemented in RecordingInfo.

Definition at line 6387 of file programinfo.cpp.

Referenced by CompleteJob(), JobQueue::DoTranscodeThread(), RecordingInfo::SaveFilesize(), and UpdateFileSize().

◆ SaveLastPlayPos()

void ProgramInfo::SaveLastPlayPos ( uint64_t  frame)

◆ SaveBookmark()

void ProgramInfo::SaveBookmark ( uint64_t  frame)

Clears any existing bookmark in DB and if frame is greater than 0 sets a new bookmark.

Definition at line 2669 of file programinfo.cpp.

Referenced by PlaybackBox::ClearBookmark(), CompleteJob(), MainServer::HandleSetBookmark(), MythPlayerUI::SetBookmark(), V2Video::SetSavedBookmark(), Dvr::SetSavedBookmark(), Video::SetSavedBookmark(), and V2Dvr::SetSavedBookmark().

◆ SaveDVDBookmark()

void ProgramInfo::SaveDVDBookmark ( const QStringList &  fields)
static

Definition at line 2913 of file programinfo.cpp.

Referenced by MythDVDPlayer::SetBookmark().

◆ SaveBDBookmark()

void ProgramInfo::SaveBDBookmark ( const QStringList &  fields)
static

Definition at line 2975 of file programinfo.cpp.

Referenced by MythBDPlayer::SetBookmark().

◆ SaveEditing()

void ProgramInfo::SaveEditing ( bool  edit)

Sets "editing" field in "recorded" table to "edit".

Parameters
editEditing state to set.

Definition at line 3122 of file programinfo.cpp.

Referenced by MythPlayerEditorUI::DisableEdit(), MythPlayerEditorUI::EnableEdit(), and TV::HandleOSDAlreadyEditing().

◆ SaveTranscodeStatus()

void ProgramInfo::SaveTranscodeStatus ( TranscodingStatus  trans)

Set "transcoded" field in "recorded" table to "trans".

Note
Also sets the FL_TRANSCODED flag if the status is TRASCODING_COMPLETE and clears it otherwise.
Parameters
transvalue to set transcoded field to.

Definition at line 3310 of file programinfo.cpp.

Referenced by JobQueue::DoTranscodeThread().

◆ SaveWatched()

void ProgramInfo::SaveWatched ( bool  watchedFlag)

◆ SaveDeletePendingFlag()

void ProgramInfo::SaveDeletePendingFlag ( bool  deleteFlag)

Set "deletepending" field in "recorded" table to "deleteFlag".

Parameters
deleteFlagvalue to set delete pending field to.

Definition at line 3147 of file programinfo.cpp.

Referenced by MainServer::DoDeleteThread(), and MainServer::DoHandleDeleteRecording().

◆ SaveCommFlagged()

void ProgramInfo::SaveCommFlagged ( CommFlagStatus  flag)

Set "commflagged" field in "recorded" table to "flag".

Parameters
flagvalue to set commercial flagging field to.

Definition at line 3333 of file programinfo.cpp.

Referenced by Dvr::AddRecordedProgram(), V2Dvr::AddRecordedProgram(), CompleteJob(), DoFlagCommercials(), and TVRec::StartedRecording().

◆ SaveAutoExpire()

void ProgramInfo::SaveAutoExpire ( AutoExpireType  autoExpire,
bool  updateDelete = false 
)

Set "autoexpire" field in "recorded" table to "autoExpire".

Parameters
autoExpirevalue to set auto expire field to.
updateDeleteiff true, call UpdateLastDelete(true)

Definition at line 3386 of file programinfo.cpp.

Referenced by Dvr::AddRecordedProgram(), V2Dvr::AddRecordedProgram(), TVRec::CreateLiveTVRingBuffer(), MainServer::DoHandleDeleteRecording(), MainServer::DoHandleUndeleteRecording(), PlaybackBox::doPlaylistExpireSetting(), TV::QuickRecord(), TVRec::SwitchLiveTVRingBuffer(), TV::ToggleAutoExpire(), and TVRec::TuningRestartRecorder().

◆ SavePreserve()

void ProgramInfo::SavePreserve ( bool  preserveEpisode)

Set "preserve" field in "recorded" table to "preserveEpisode".

Parameters
preserveEpisodevalue to set preserve field to.

Definition at line 3359 of file programinfo.cpp.

Referenced by Dvr::AddRecordedProgram(), and V2Dvr::AddRecordedProgram().

◆ SaveBasename()

bool ProgramInfo::SaveBasename ( const QString &  basename)

Sets a recording's basename in the database.

Definition at line 2468 of file programinfo.cpp.

Referenced by CompleteJob().

◆ SaveAspect()

void ProgramInfo::SaveAspect ( uint64_t  frame,
MarkTypes  type,
uint  customAspect 
)

Store aspect ratio of a frame in the recordedmark table.

Note
All frames until the next one with a stored aspect ratio are assumed to have the same aspect ratio

Definition at line 4222 of file programinfo.cpp.

Referenced by RecorderBase::AspectChange().

◆ SaveResolution()

void ProgramInfo::SaveResolution ( uint64_t  frame,
uint  width,
uint  height 
)

Store the Resolution at frame in the recordedmarkup table.

Note
All frames until the next one with a stored resolution are assumed to have the same resolution

Definition at line 4411 of file programinfo.cpp.

Referenced by RecorderBase::ResolutionChange().

◆ SaveFrameRate()

void ProgramInfo::SaveFrameRate ( uint64_t  frame,
uint  framerate 
)

Store the Frame Rate at frame in the recordedmarkup table.

Note
All frames until the next one with a stored frame rate are assumed to have the same frame rate

Definition at line 4259 of file programinfo.cpp.

Referenced by RecorderBase::FrameRateChange().

◆ SaveVideoScanType()

void ProgramInfo::SaveVideoScanType ( uint64_t  frame,
bool  progressive 
)

Store the Progressive/Interlaced state in the recordedmarkup table.

Note
All frames until the next one with a stored Scan type are assumed to have the same scan type

Definition at line 4284 of file programinfo.cpp.

Referenced by RecorderBase::VideoScanChange().

◆ SaveTotalDuration()

void ProgramInfo::SaveTotalDuration ( std::chrono::milliseconds  duration)

Store the Total Duration at frame 0 in the recordedmarkup table.

Definition at line 4377 of file programinfo.cpp.

Referenced by RecordingInfo::FinishedRecording(), DecoderBase::SaveTotalDuration(), and RecorderBase::SetDuration().

◆ SaveTotalFrames()

void ProgramInfo::SaveTotalFrames ( int64_t  frames)

Store the Total Frames at frame 0 in the recordedmarkup table.

Definition at line 4393 of file programinfo.cpp.

Referenced by TV::PrepareToExitPlayer(), DecoderBase::SaveTotalFrames(), and RecorderBase::SetTotalFrames().

◆ SaveVideoProperties()

void ProgramInfo::SaveVideoProperties ( uint  mask,
uint  video_property_flags 
)

◆ SaveMarkupFlag()

void ProgramInfo::SaveMarkupFlag ( MarkTypes  type) const

Clears the specified flag, then if sets it.

Definition at line 3747 of file programinfo.cpp.

Referenced by DoFlagCommercials(), and DeleteMap::SaveMap().

◆ ClearMarkupFlag()

void ProgramInfo::ClearMarkupFlag ( MarkTypes  type) const
inline

Definition at line 647 of file programinfo.h.

Referenced by ClearBookmarks(), ClearSeekTable(), and Transcode::TranscodeFile().

◆ UpdateLastDelete()

void ProgramInfo::UpdateLastDelete ( bool  setTime) const

Set or unset the record.last_delete field.

Parameters
setTimeto set or clear the time stamp.

Definition at line 3412 of file programinfo.cpp.

Referenced by MainServer::DoHandleUndeleteRecording(), PlaybackBox::RemoveProgram(), SaveAutoExpire(), SavePreserve(), and SaveWatched().

◆ MarkAsInUse()

void ProgramInfo::MarkAsInUse ( bool  inuse,
const QString &  usedFor = "" 
)

◆ UpdateInUseMark()

void ProgramInfo::UpdateInUseMark ( bool  force = false)

◆ SaveSeasonEpisode()

void ProgramInfo::SaveSeasonEpisode ( uint  seas,
uint  ep 
)

Definition at line 4972 of file programinfo.cpp.

Referenced by LookerUpper::customEvent().

◆ SaveInetRef()

void ProgramInfo::SaveInetRef ( const QString &  inet)

Definition at line 4996 of file programinfo.cpp.

◆ DiscoverRecordingDirectory()

QString ProgramInfo::DiscoverRecordingDirectory ( void  )
Note
This method sometimes initiates a QUERY_CHECKFILE MythProto call and so should not be called from the UI thread.

Definition at line 5091 of file programinfo.cpp.

Referenced by Scheduler::FillRecordingDir(), and MarkAsInUse().

◆ GetPlaybackURL()

QString ProgramInfo::GetPlaybackURL ( bool  checkMaster = false,
bool  forceCheckLocal = false 
)

Returns filename or URL to be used to play back this recording.

If the file is accessible locally, the filename will be returned, otherwise a myth:// URL will be returned.

Note
This method sometimes initiates a QUERY_CHECKFILE MythProto call and so should not be called from the UI thread.

Definition at line 2546 of file programinfo.cpp.

Referenced by CompleteJob(), commDetector2::debugDirectory(), DiscoverRecordingDirectory(), JobQueue::DoFlagCommercialsThread(), JobQueue::DoTranscodeThread(), get_filename(), GetPlaybackURL(), getProgramInfoForFile(), TV::HandleStateChange(), IsFileReadable(), MythPlayerUI::JumpToProgram(), main(), MarkAsInUse(), preview_helper(), JobQueue::ProcessJob(), PlaybackBox::processNetworkControlCommand(), RunCCExtract(), SubstituteMatches(), TV::SwitchInputs(), and MythPlayerUI::SwitchToProgram().

◆ DiscoverProgramInfoType()

ProgramInfoType ProgramInfo::DiscoverProgramInfoType ( void  ) const

Definition at line 2446 of file programinfo.cpp.

◆ QueryCutList()

bool ProgramInfo::QueryCutList ( frm_dir_map_t delMap,
bool  loadAutosave = false 
) const

◆ SaveCutList()

void ProgramInfo::SaveCutList ( frm_dir_map_t delMap,
bool  isAutoSave = false 
) const

Definition at line 3489 of file programinfo.cpp.

Referenced by CopySkipListToCutList(), DeleteMap::SaveMap(), and SetMarkupList().

◆ QueryCommBreakList()

void ProgramInfo::QueryCommBreakList ( frm_dir_map_t frames) const

◆ SaveCommBreakList()

void ProgramInfo::SaveCommBreakList ( frm_dir_map_t frames) const

Definition at line 3536 of file programinfo.cpp.

Referenced by DoFlagCommercials(), and SetMarkupList().

◆ QueryPositionMap()

void ProgramInfo::QueryPositionMap ( frm_pos_map_t posMap,
MarkTypes  type 
) const

◆ ClearPositionMap()

void ProgramInfo::ClearPositionMap ( MarkTypes  type) const

◆ SavePositionMap()

void ProgramInfo::SavePositionMap ( frm_pos_map_t posMap,
MarkTypes  type,
int64_t  min_frame = -1,
int64_t  max_frame = -1 
) const

Definition at line 3839 of file programinfo.cpp.

Referenced by UpdatePositionMap().

◆ SavePositionMapDelta()

void ProgramInfo::SavePositionMapDelta ( frm_pos_map_t posMap,
MarkTypes  type 
) const

◆ QueryKeyFrameInfo()

bool ProgramInfo::QueryKeyFrameInfo ( uint64_t *  result,
uint64_t  position_or_keyframe,
bool  backwards,
MarkTypes  type,
const char *  from_filemarkup_asc,
const char *  from_filemarkup_desc,
const char *  from_recordedseek_asc,
const char *  from_recordedseek_desc 
) const

◆ QueryKeyFramePosition()

bool ProgramInfo::QueryKeyFramePosition ( uint64_t *  position,
uint64_t  keyframe,
bool  backwards 
) const

◆ QueryPositionKeyFrame()

bool ProgramInfo::QueryPositionKeyFrame ( uint64_t *  keyframe,
uint64_t  position,
bool  backwards 
) const

◆ QueryKeyFrameDuration()

bool ProgramInfo::QueryKeyFrameDuration ( uint64_t *  duration,
uint64_t  keyframe,
bool  backwards 
) const

◆ QueryDurationKeyFrame()

bool ProgramInfo::QueryDurationKeyFrame ( uint64_t *  keyframe,
uint64_t  duration,
bool  backwards 
) const

◆ QueryMarkup()

void ProgramInfo::QueryMarkup ( QVector< MarkupEntry > &  mapMark,
QVector< MarkupEntry > &  mapSeek 
) const

Definition at line 4635 of file programinfo.cpp.

Referenced by GetMarkup(), Dvr::GetRecordedMarkup(), and V2Dvr::GetRecordedMarkup().

◆ SaveMarkup()

void ProgramInfo::SaveMarkup ( const QVector< MarkupEntry > &  mapMark,
const QVector< MarkupEntry > &  mapSeek 
) const

Definition at line 4716 of file programinfo.cpp.

Referenced by SetMarkup(), Dvr::SetRecordedMarkup(), and V2Dvr::SetRecordedMarkup().

◆ SendUpdateEvent()

void ProgramInfo::SendUpdateEvent ( void  ) const

◆ SendAddedEvent()

void ProgramInfo::SendAddedEvent ( void  ) const

Sends event out that the ProgramInfo should be added to lists.

Definition at line 2753 of file programinfo.cpp.

Referenced by RecordingInfo::InsertFile(), and SaveDeletePendingFlag().

◆ SendDeletedEvent()

void ProgramInfo::SendDeletedEvent ( void  ) const

Sends event out that the ProgramInfo should be delete from lists.

Definition at line 2758 of file programinfo.cpp.

Referenced by MainServer::DoHandleDeleteRecording().

◆ i18n()

QString ProgramInfo::i18n ( const QString &  msg)
static

◆ MakeUniqueKey() [2/2]

QString ProgramInfo::MakeUniqueKey ( uint  chanid,
const QDateTime &  recstartts 
)
static

Creates a unique string that can be used to identify a recording.

Definition at line 1168 of file programinfo.cpp.

◆ ExtractKey()

bool ProgramInfo::ExtractKey ( const QString &  uniquekey,
uint chanid,
QDateTime &  recstartts 
)
static

Extracts chanid and recstartts from a unique key generated by MakeUniqueKey().

Returns
true iff a valid chanid and recstartts have been extracted.

Definition at line 1177 of file programinfo.cpp.

Referenced by TV::customEvent(), and incomingCustomEvent().

◆ ExtractKeyFromPathname()

bool ProgramInfo::ExtractKeyFromPathname ( const QString &  pathname,
uint chanid,
QDateTime &  recstartts 
)
static

Definition at line 1188 of file programinfo.cpp.

Referenced by QueryKeyFromPathname().

◆ QueryKeyFromPathname()

bool ProgramInfo::QueryKeyFromPathname ( const QString &  pathname,
uint chanid,
QDateTime &  recstartts 
)
static

Definition at line 1210 of file programinfo.cpp.

Referenced by preview_helper(), and ProgramInfo().

◆ QueryRecordedIdFromPathname()

bool ProgramInfo::QueryRecordedIdFromPathname ( const QString &  pathname,
uint recordedid 
)
static

Definition at line 1233 of file programinfo.cpp.

Referenced by Dvr::RecordedIdForPathname(), and V2Dvr::RecordedIdForPathname().

◆ QueryRecordingGroupPassword()

QString ProgramInfo::QueryRecordingGroupPassword ( const QString &  group)
static

Definition at line 5038 of file programinfo.cpp.

◆ QueryBookmark() [2/2]

uint64_t ProgramInfo::QueryBookmark ( uint  chanid,
const QDateTime &  recstartts 
)
static

Definition at line 2804 of file programinfo.cpp.

◆ QueryInUseMap()

QMap< QString, uint32_t > ProgramInfo::QueryInUseMap ( void  )
static

◆ QueryJobsRunning()

QMap< QString, bool > ProgramInfo::QueryJobsRunning ( int  type)
static

◆ LoadFromScheduler()

QStringList ProgramInfo::LoadFromScheduler ( const QString &  tmptable,
int  recordid 
)
static

◆ UpdateMarkTimeStamp()

void ProgramInfo::UpdateMarkTimeStamp ( bool  bookmarked) const

Definition at line 2687 of file programinfo.cpp.

Referenced by SaveBookmark().

◆ UpdateLastPlayTimeStamp()

void ProgramInfo::UpdateLastPlayTimeStamp ( bool  lastplay) const

Definition at line 2728 of file programinfo.cpp.

Referenced by SaveLastPlayPos().

◆ QueryMarkupMap() [1/3]

void ProgramInfo::QueryMarkupMap ( frm_dir_map_t marks,
MarkTypes  type,
bool  merge = false 
) const

◆ SaveMarkupMap()

void ProgramInfo::SaveMarkupMap ( const frm_dir_map_t marks,
MarkTypes  type = MARK_ALL,
int64_t  min_frame = -1,
int64_t  max_frame = -1 
) const

◆ ClearMarkupMap()

void ProgramInfo::ClearMarkupMap ( MarkTypes  type = MARK_ALL,
int64_t  min_frame = -1,
int64_t  max_frame = -1 
) const

◆ CreateRecordBasename()

QString ProgramInfo::CreateRecordBasename ( const QString &  ext) const
protected

Returns a filename for a recording based on the recording channel and date.

Definition at line 2392 of file programinfo.cpp.

Referenced by RecordingInfo::InsertRecording().

◆ LoadProgramFromRecorded()

bool ProgramInfo::LoadProgramFromRecorded ( uint  chanid,
const QDateTime &  _recstartts 
)
protected

Loads ProgramInfo for an existing recording.

Returns
true iff sucessful

Definition at line 1985 of file programinfo.cpp.

Referenced by ProgramInfo().

◆ FromStringList()

bool ProgramInfo::FromStringList ( QStringList::const_iterator &  it,
const QStringList::const_iterator &  end 
)
protected

Uses a QStringList to initialize this ProgramInfo instance.

Parameters
itIterator pointing to first item in list to treat as beginning of serialized ProgramInfo.
endIterator that will stop parsing of the ProgramInfo
Returns
true if it succeeds, false if it fails.
See also
FromStringList(const QStringList&,uint) ToStringList(QStringList&) const

Definition at line 1366 of file programinfo.cpp.

◆ QueryMarkupMap() [2/3]

void ProgramInfo::QueryMarkupMap ( const QString &  video_pathname,
frm_dir_map_t marks,
MarkTypes  type,
bool  merge = false 
)
staticprotected

Definition at line 3673 of file programinfo.cpp.

◆ QueryMarkupMap() [3/3]

void ProgramInfo::QueryMarkupMap ( uint  chanid,
const QDateTime &  recstartts,
frm_dir_map_t marks,
MarkTypes  type,
bool  merge = false 
)
staticprotected

Definition at line 3704 of file programinfo.cpp.

◆ InitStatics()

int ProgramInfo::InitStatics ( void  )
staticprotected

Definition at line 5439 of file programinfo.cpp.

Referenced by pginfo_init_statics().

◆ SetAvailableStatus()

void ProgramInfo::SetAvailableStatus ( AvailableStatusType  status,
const QString &  where 
)

◆ GetAvailableStatus()

AvailableStatusType ProgramInfo::GetAvailableStatus ( void  ) const
inline

Friends And Related Function Documentation

◆ TestRecordingExtender

friend class TestRecordingExtender
friend

Definition at line 70 of file programinfo.h.

◆ pginfo_init_statics

int pginfo_init_statics ( void  )
friend

Definition at line 39 of file programinfo.cpp.

Member Data Documentation

◆ kCatName

const std::array<const QString,5> ProgramInfo::kCatName
staticprivate

Definition at line 73 of file programinfo.h.

◆ kNumCatTypes

constexpr int ProgramInfo::kNumCatTypes = 5
staticconstexpr

Definition at line 75 of file programinfo.h.

◆ m_title

QString ProgramInfo::m_title
protected

◆ m_sortTitle

QString ProgramInfo::m_sortTitle
protected

Definition at line 764 of file programinfo.h.

Referenced by clear(), clone(), ensureSortFields(), ProgramInfo(), SetTitle(), and ToMap().

◆ m_subtitle

QString ProgramInfo::m_subtitle
protected

◆ m_sortSubtitle

QString ProgramInfo::m_sortSubtitle
protected

Definition at line 766 of file programinfo.h.

Referenced by clear(), clone(), ensureSortFields(), ProgramInfo(), SetSubtitle(), and ToMap().

◆ m_description

QString ProgramInfo::m_description
protected

◆ m_season

uint ProgramInfo::m_season {0}
protected

◆ m_episode

uint ProgramInfo::m_episode {0}
protected

◆ m_totalEpisodes

uint ProgramInfo::m_totalEpisodes {0}
protected

◆ m_syndicatedEpisode

QString ProgramInfo::m_syndicatedEpisode
protected

◆ m_category

QString ProgramInfo::m_category
protected

◆ m_director

QString ProgramInfo::m_director
protected

Definition at line 773 of file programinfo.h.

Referenced by clear(), clone(), operator==(), ProgramInfo(), and ToMap().

◆ m_recPriority

int32_t ProgramInfo::m_recPriority {0}
protected

◆ m_chanId

uint32_t ProgramInfo::m_chanId {0}
protected

Definition at line 777 of file programinfo.h.

Referenced by RecordingInfo::AddHistory(), RecordingInfo::ApplyOriginalAirDateChange(), RecordingInfo::ApplyRecordPlayGroupChange(), RecordingInfo::ApplyRecordRecGroupChange(), RecordingInfo::ApplyRecordRecID(), RecordingInfo::ApplyRecordRecTitleChange(), RecordingInfo::ApplyStarsChange(), RecordingInfo::ApplyStorageGroupChange(), RecordingInfo::ApplyTranscoderProfileChange(), RecordingInfo::ApplyTranscoderProfileChangeById(), clear(), ClearMarkupMap(), ClearPositionMap(), RecordingInfo::clone(), clone(), CreateRecordBasename(), DiscoverProgramInfoType(), RecordingInfo::FinishedRecording(), RecordingInfo::ForgetHistory(), FromStringList(), GetFilesize(), RecordingInfo::InsertProgram(), IsSameChannel(), IsSameProgramWeakCheck(), IsSameRecording(), LoadProgramFromRecorded(), MarkAsInUse(), operator==(), ProgramInfo(), QueryAutoExpire(), QueryAverageAspectRatio(), QueryAverageFrameRate(), QueryAverageHeight(), QueryAverageScanProgressive(), QueryAverageWidth(), QueryBookmarkTimeStamp(), QueryCategoryType(), QueryIsEditing(), QueryIsInUse(), QueryKeyFrameInfo(), QueryMarkup(), QueryMarkupMap(), QueryMplexID(), QueryPositionMap(), QueryRecordingGroup(), QueryTotalDuration(), QueryTotalFrames(), QueryTranscoderID(), QueryTranscodeStatus(), QueryTuningInfo(), RecordingInfo::RecordingInfo(), Reload(), SaveAspect(), SaveAutoExpire(), SaveCommFlagged(), SaveCutList(), SaveDeletePendingFlag(), SaveEditing(), SaveFilesize(), SaveFrameRate(), SaveInetRef(), SaveMarkup(), SaveMarkupMap(), SavePositionMap(), SavePositionMapDelta(), SavePreserve(), SaveResolution(), SaveSeasonEpisode(), SaveTotalDuration(), SaveTotalFrames(), SaveTranscodeStatus(), SaveVideoProperties(), SaveVideoScanType(), SaveWatched(), SetPathname(), RecordingInfo::StartedRecording(), SubstituteMatches(), ToMap(), ToStringList(), and RecordingInfo::UpdateRecordingEnd().

◆ m_chanStr

QString ProgramInfo::m_chanStr
protected

◆ m_chanSign

QString ProgramInfo::m_chanSign
protected

◆ m_chanName

QString ProgramInfo::m_chanName
protected

◆ m_chanPlaybackFilters

QString ProgramInfo::m_chanPlaybackFilters
protected

◆ m_recGroup

QString ProgramInfo::m_recGroup {"Default"}
protected

◆ m_playGroup

QString ProgramInfo::m_playGroup {"Default"}
protected

◆ m_pathname

QString ProgramInfo::m_pathname
mutableprotected

◆ m_hostname

QString ProgramInfo::m_hostname
protected

◆ m_storageGroup

QString ProgramInfo::m_storageGroup {"Default"}
protected

◆ m_seriesId

QString ProgramInfo::m_seriesId
protected

◆ m_programId

QString ProgramInfo::m_programId
protected

◆ m_inetRef

QString ProgramInfo::m_inetRef
protected

◆ m_catType

CategoryType ProgramInfo::m_catType {kCategoryNone}
protected

◆ m_fileSize

uint64_t ProgramInfo::m_fileSize {0ULL}
protected

◆ m_startTs

QDateTime ProgramInfo::m_startTs {MythDate::current(true)}
protected

◆ m_endTs

QDateTime ProgramInfo::m_endTs {m_startTs}
protected

◆ m_recStartTs

QDateTime ProgramInfo::m_recStartTs {m_startTs}
protected

Definition at line 800 of file programinfo.h.

Referenced by RecordingInfo::ApplyOriginalAirDateChange(), RecordingInfo::ApplyRecordPlayGroupChange(), RecordingInfo::ApplyRecordRecGroupChange(), RecordingInfo::ApplyRecordRecID(), RecordingInfo::ApplyRecordRecTitleChange(), RecordingInfo::ApplyStarsChange(), RecordingInfo::ApplyStorageGroupChange(), RecordingInfo::ApplyTranscoderProfileChange(), RecordingInfo::ApplyTranscoderProfileChangeById(), CalculateRecordedProgress(), CalculateWatchedProgress(), clear(), ClearMarkupMap(), ClearPositionMap(), RecordingInfo::clone(), clone(), CreateRecordBasename(), RecordingInfo::DeleteHistory(), RecordingInfo::FinishedRecording(), RecordingInfo::ForgetHistory(), FromStringList(), GetFilesize(), GetSecondsInRecording(), RecordingInfo::InsertProgram(), RecordingInfo::InsertRecording(), IsSameRecording(), LoadProgramFromRecorded(), MarkAsInUse(), operator==(), ProgramInfo(), QueryAutoExpire(), QueryAverageAspectRatio(), QueryAverageFrameRate(), QueryAverageHeight(), QueryAverageScanProgressive(), QueryAverageWidth(), QueryBookmarkTimeStamp(), QueryIsEditing(), QueryIsInUse(), QueryKeyFrameInfo(), QueryMarkup(), QueryMarkupMap(), QueryPositionMap(), QueryRecordingGroup(), QueryTotalDuration(), QueryTotalFrames(), QueryTranscoderID(), QueryTranscodeStatus(), RecordingInfo::RecordingInfo(), Reload(), SaveAspect(), SaveAutoExpire(), SaveCommFlagged(), SaveCutList(), SaveDeletePendingFlag(), SaveEditing(), SaveFilesize(), SaveFrameRate(), SaveInetRef(), SaveMarkup(), SaveMarkupMap(), SavePositionMap(), SavePositionMapDelta(), SavePreserve(), SaveResolution(), SaveSeasonEpisode(), SaveTotalDuration(), SaveTotalFrames(), SaveTranscodeStatus(), SaveVideoScanType(), SaveWatched(), RecordingInfo::StartedRecording(), SubstituteMatches(), ToMap(), toString(), ToStringList(), UpdateLastDelete(), and RecordingInfo::UpdateRecordingEnd().

◆ m_recEndTs

QDateTime ProgramInfo::m_recEndTs {m_startTs}
protected

◆ m_stars

float ProgramInfo::m_stars {0.0F}
protected

◆ m_originalAirDate

QDate ProgramInfo::m_originalAirDate
protected

◆ m_lastModified

QDateTime ProgramInfo::m_lastModified {m_startTs}
protected

◆ kLastInUseOffset

constexpr int64_t ProgramInfo::kLastInUseOffset {4LL * 60 * 60}
staticconstexprprotected

Definition at line 806 of file programinfo.h.

Referenced by clear(), clone(), LoadProgramFromRecorded(), MarkAsInUse(), and ProgramInfo().

◆ m_lastInUseTime

QDateTime ProgramInfo::m_lastInUseTime {m_startTs.addSecs(-kLastInUseOffset)}
protected

◆ m_recPriority2

int32_t ProgramInfo::m_recPriority2 {0}
protected

◆ m_recordId

uint32_t ProgramInfo::m_recordId {0}
protected

◆ m_parentId

uint32_t ProgramInfo::m_parentId {0}
protected

◆ m_sourceId

uint32_t ProgramInfo::m_sourceId {0}
protected

◆ m_inputId

uint32_t ProgramInfo::m_inputId {0}
protected

◆ m_findId

uint32_t ProgramInfo::m_findId {0}
protected

◆ m_programFlags

uint32_t ProgramInfo::m_programFlags {FL_NONE}
protected

◆ m_videoProperties

VideoPropsType ProgramInfo::m_videoProperties {VID_UNKNOWN}
protected

◆ m_audioProperties

AudioPropsType ProgramInfo::m_audioProperties {AUD_UNKNOWN}
protected

◆ m_subtitleProperties

SubtitlePropsType ProgramInfo::m_subtitleProperties {SUB_UNKNOWN}
protected

◆ m_year

uint16_t ProgramInfo::m_year {0}
protected

◆ m_partNumber

uint16_t ProgramInfo::m_partNumber {0}
protected

◆ m_partTotal

uint16_t ProgramInfo::m_partTotal {0}
protected

◆ m_recStatus

int8_t ProgramInfo::m_recStatus {RecStatus::Unknown}
protected

◆ m_recType

uint8_t ProgramInfo::m_recType {kNotRecording}
protected

◆ m_dupIn

uint8_t ProgramInfo::m_dupIn {kDupsInAll}
protected

◆ m_dupMethod

uint8_t ProgramInfo::m_dupMethod {kDupCheckSubThenDesc}
protected

◆ m_recordedId

uint ProgramInfo::m_recordedId {0}
protected

◆ m_inputName

QString ProgramInfo::m_inputName
protected

◆ m_bookmarkUpdate

QDateTime ProgramInfo::m_bookmarkUpdate
protected

◆ m_availableStatus

uint8_t ProgramInfo::m_availableStatus {asAvailable}
protected

◆ m_recordedPercent

int8_t ProgramInfo::m_recordedPercent {-1}
protected

Definition at line 837 of file programinfo.h.

Referenced by CalculateRecordedProgress(), and ToMap().

◆ m_watchedPercent

int8_t ProgramInfo::m_watchedPercent {-1}
protected

Definition at line 838 of file programinfo.h.

Referenced by CalculateWatchedProgress(), and ToMap().

◆ m_spread

int8_t ProgramInfo::m_spread {-1}

◆ m_startCol

int8_t ProgramInfo::m_startCol {-1}

◆ kFromRecordedQuery

const QString ProgramInfo::kFromRecordedQuery
static
Initial value:
=
"SELECT r.title, r.subtitle, r.description, "
" r.season, r.episode, r.category, "
" r.chanid, c.channum, c.callsign, "
" c.name, c.outputfilters,r.recgroup, "
" r.playgroup, r.storagegroup, r.basename, "
" r.hostname, r.recpriority, r.seriesid, "
" r.programid, r.inetref, r.filesize, "
" r.progstart, r.progend, r.stars, "
" r.starttime, r.endtime, p.airdate+0, "
" r.originalairdate, r.lastmodified, r.recordid, "
" c.commmethod, r.commflagged, r.previouslyshown, "
" r.transcoder, r.transcoded, r.deletepending, "
" r.preserve, r.cutlist, r.autoexpire, "
" r.editing, r.bookmark, r.watched, "
" p.audioprop+0, p.videoprop+0, p.subtitletypes+0, "
" r.findid, rec.dupin, rec.dupmethod, "
" p.syndicatedepisodenumber, p.partnumber, p.parttotal, "
" p.season, p.episode, p.totalepisodes, "
" p.category_type, r.recordedid, r.inputname, "
" r.bookmarkupdate, r.lastplay "
"FROM recorded AS r "
"LEFT JOIN channel AS c "
"ON (r.chanid = c.chanid) "
"LEFT JOIN recordedprogram AS p "
"ON (r.chanid = p.chanid AND "
" r.progstart = p.starttime) "
"LEFT JOIN record AS rec "
"ON (r.recordid = rec.recordid) "

Definition at line 847 of file programinfo.h.

Referenced by LoadFromRecorded(), and LoadProgramFromRecorded().

◆ m_inUseForWhat

QString ProgramInfo::m_inUseForWhat
protected

◆ m_positionMapDBReplacement

PMapDBReplacement* ProgramInfo::m_positionMapDBReplacement {nullptr}
protected

◆ s_staticDataLock

QMutex ProgramInfo::s_staticDataLock
staticprotected

Definition at line 853 of file programinfo.h.

Referenced by InitStatics(), and RecordingInfo::RecordingInfo().

◆ s_updater

ProgramInfoUpdater * ProgramInfo::s_updater
staticprotected

◆ s_usingProgIDAuth

bool ProgramInfo::s_usingProgIDAuth = true
staticprotected

Definition at line 855 of file programinfo.h.

Referenced by CheckProgramIDAuthorities(), IsDuplicateProgram(), and IsSameProgram().

◆ m_previewUpdate

QDateTime ProgramInfo::m_previewUpdate

Definition at line 858 of file programinfo.h.

Referenced by ProgramInfoCache::Update(), and ProgramInfoCache::UpdateFileSize().


The documentation for this class was generated from the following files: