Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
PVR::CPVREpgInfoTag Class Referencefinal

#include <EpgInfoTag.h>

Inheritance diagram for PVR::CPVREpgInfoTag:
ISerializable

Public Member Functions

 CPVREpgInfoTag (const EPG_TAG &data, int iClientId, const std::shared_ptr< CPVREpgChannelData > &channelData, int iEpgID)
 Create a new EPG infotag.
 
 CPVREpgInfoTag (const std::shared_ptr< CPVREpgChannelData > &channelData, int iEpgID, const CDateTime &start, const CDateTime &end, bool bIsGapTag)
 Create a new EPG infotag.
 
void SetChannelData (const std::shared_ptr< CPVREpgChannelData > &data)
 Set data for the channel linked to this EPG infotag.
 
bool operator== (const CPVREpgInfoTag &right) const
 
bool operator!= (const CPVREpgInfoTag &right) const
 
void Serialize (CVariant &value) const override
 
int ClientID () const
 Get the identifier of the client that serves this event.
 
bool IsActive () const
 Check if this event is currently active.
 
bool WasActive () const
 Check if this event is in the past.
 
bool IsUpcoming () const
 Check if this event is in the future.
 
float ProgressPercentage () const
 Get the progress of this tag in percent.
 
int Progress () const
 Get the progress of this tag in seconds.
 
int EpgID () const
 Get EPG ID of this tag.
 
void SetEpgID (int iEpgID)
 Sets the EPG id for this event.
 
void SetUniqueBroadcastID (unsigned int iUniqueBroadcastID)
 Change the unique broadcast ID of this event.
 
unsigned int UniqueBroadcastID () const
 Get the unique broadcast ID.
 
int DatabaseID () const
 Get the event's database ID.
 
int UniqueChannelID () const
 Get the unique ID of the channel associated with this event.
 
std::string ChannelIconPath () const
 Get the path for the icon of the channel associated with this event.
 
CDateTime StartAsUTC () const
 Get the event's start time.
 
CDateTime StartAsLocalTime () const
 Get the event's start time.
 
CDateTime EndAsUTC () const
 Get the event's end time.
 
CDateTime EndAsLocalTime () const
 Get the event's end time.
 
void SetEndFromUTC (const CDateTime &end)
 Change the event's end time.
 
int GetDuration () const
 Get the duration of this event in seconds.
 
std::string Title () const
 Get the title of this event.
 
std::string PlotOutline () const
 Get the plot outline of this event.
 
std::string Plot () const
 Get the plot of this event.
 
std::string OriginalTitle () const
 Get the original title of this event.
 
const std::vector< std::string > Cast () const
 Get the cast of this event.
 
const std::vector< std::string > Directors () const
 Get the director(s) of this event.
 
const std::vector< std::string > Writers () const
 Get the writer(s) of this event.
 
const std::string GetCastLabel () const
 Get the cast of this event as formatted string.
 
const std::string GetDirectorsLabel () const
 Get the director(s) of this event as formatted string.
 
const std::string GetWritersLabel () const
 Get the writer(s) of this event as formatted string.
 
const std::string GetGenresLabel () const
 Get the genre(s) of this event as formatted string.
 
int Year () const
 Get the year of this event.
 
std::string IMDBNumber () const
 Get the imdbnumber of this event.
 
int GenreType () const
 Get the genre type ID of this event.
 
int GenreSubType () const
 Get the genre subtype ID of this event.
 
std::string GenreDescription () const
 Get the genre description of this event.
 
const std::vector< std::string > Genre () const
 Get the genre as human readable string.
 
CDateTime FirstAired () const
 Get the first air date of this event.
 
int ParentalRating () const
 Get the parental rating of this event.
 
std::string ParentalRatingCode () const
 Get the parental rating code of this event.
 
int StarRating () const
 Get the star rating of this event.
 
int SeriesNumber () const
 The series number of this event.
 
std::string SeriesLink () const
 The series link for this event.
 
int EpisodeNumber () const
 The episode number of this event.
 
int EpisodePart () const
 The episode part number of this event.
 
std::string EpisodeName () const
 The episode name of this event.
 
std::string IconPath () const
 Get the path to the icon for this event used by Kodi.
 
std::string ClientIconPath () const
 Get the path to the icon for this event as given by the client.
 
std::string Path () const
 The path to this event.
 
bool IsRecordable () const
 Check if this event can be recorded.
 
bool IsPlayable () const
 Check if this event can be played.
 
bool QueuePersistQuery (const std::shared_ptr< CPVREpgDatabase > &database)
 Write query to persist this tag in the query queue of the given database.
 
bool Update (const CPVREpgInfoTag &tag, bool bUpdateBroadcastId=true)
 Update the information in this tag with the info in the given tag.
 
std::vector< PVR_EDL_ENTRYGetEdl () const
 Retrieve the edit decision list (EDL) of an EPG tag.
 
bool IsSeries () const
 Check whether this tag has any series attributes.
 
bool IsRadio () const
 Check whether this tag is associated with a radion or TV channel.
 
bool IsParentalLocked () const
 Check whether this event is parental locked.
 
bool IsGapTag () const
 Check whether this event is a real event or a gap in the EPG timeline.
 
bool IsNew () const
 Check whether this tag will be flagged as new.
 
bool IsPremiere () const
 Check whether this tag will be flagged as a premiere.
 
bool IsFinale () const
 Check whether this tag will be flagged as a finale.
 
bool IsLive () const
 Check whether this tag will be flagged as live.
 
unsigned int Flags () const
 Return the flags (EPG_TAG_FLAG_*) of this event as a bitfield.
 

Static Public Member Functions

static const std::vector< std::string > Tokenize (const std::string &str)
 Split the given string into tokens. Interprets occurrences of EPG_STRING_TOKEN_SEPARATOR in the string as separator.
 
static const std::string DeTokenize (const std::vector< std::string > &tokens)
 Combine the given strings to a single string. Inserts EPG_STRING_TOKEN_SEPARATOR as separator.
 

Static Public Attributes

static const std::string IMAGE_OWNER_PATTERN = "epgtag_{}"
 

Friends

class CPVREpgDatabase
 

Additional Inherited Members

- Protected Member Functions inherited from ISerializable
 ~ISerializable ()=default
 

Constructor & Destructor Documentation

◆ CPVREpgInfoTag() [1/2]

CPVREpgInfoTag::CPVREpgInfoTag ( const EPG_TAG & data,
int iClientId,
const std::shared_ptr< CPVREpgChannelData > & channelData,
int iEpgID )

Create a new EPG infotag.

Parameters
dataThe tag's data.
iClientIdThe client id.
channelDataThe channel data.
iEpgIdThe id of the EPG this tag belongs to.

◆ CPVREpgInfoTag() [2/2]

CPVREpgInfoTag::CPVREpgInfoTag ( const std::shared_ptr< CPVREpgChannelData > & channelData,
int iEpgID,
const CDateTime & start,
const CDateTime & end,
bool bIsGapTag )

Create a new EPG infotag.

Parameters
channelDataThe channel data.
iEpgIdThe id of the EPG this tag belongs to.
startThe start time of the event
endThe end time of the event
bIsGapTagTrueif this is a "gap" tag, false if this is a real EPG event

Member Function Documentation

◆ Cast()

const std::vector< std::string > CPVREpgInfoTag::Cast ( ) const

Get the cast of this event.

Returns
The cast.

◆ ChannelIconPath()

std::string CPVREpgInfoTag::ChannelIconPath ( ) const

Get the path for the icon of the channel associated with this event.

Returns
The channel icon path.

◆ ClientIconPath()

std::string CPVREpgInfoTag::ClientIconPath ( ) const

Get the path to the icon for this event as given by the client.

Returns
The path to the icon

◆ ClientID()

int CPVREpgInfoTag::ClientID ( ) const

Get the identifier of the client that serves this event.

Returns
The identifier.

◆ DatabaseID()

int CPVREpgInfoTag::DatabaseID ( ) const

Get the event's database ID.

Returns
The database ID.

◆ DeTokenize()

const std::string CPVREpgInfoTag::DeTokenize ( const std::vector< std::string > & tokens)
static

Combine the given strings to a single string. Inserts EPG_STRING_TOKEN_SEPARATOR as separator.

Parameters
tokensThe tokens.
Returns
the combined string.

◆ Directors()

const std::vector< std::string > CPVREpgInfoTag::Directors ( ) const

Get the director(s) of this event.

Returns
The director(s).

◆ EndAsLocalTime()

CDateTime CPVREpgInfoTag::EndAsLocalTime ( ) const

Get the event's end time.

Returns
The end time as local time.

◆ EndAsUTC()

CDateTime CPVREpgInfoTag::EndAsUTC ( ) const

Get the event's end time.

Returns
The end time in UTC.

◆ EpgID()

int CPVREpgInfoTag::EpgID ( ) const

Get EPG ID of this tag.

Returns
The epg ID.

◆ EpisodeName()

std::string CPVREpgInfoTag::EpisodeName ( ) const

The episode name of this event.

Returns
The episode name.

◆ EpisodeNumber()

int CPVREpgInfoTag::EpisodeNumber ( ) const

The episode number of this event.

Returns
The episode number.

◆ EpisodePart()

int CPVREpgInfoTag::EpisodePart ( ) const

The episode part number of this event.

Returns
The episode part number.

◆ FirstAired()

CDateTime CPVREpgInfoTag::FirstAired ( ) const

Get the first air date of this event.

Returns
The first air date.

◆ Flags()

unsigned int PVR::CPVREpgInfoTag::Flags ( ) const
inline

Return the flags (EPG_TAG_FLAG_*) of this event as a bitfield.

Returns
the flags.

◆ Genre()

const std::vector< std::string > CPVREpgInfoTag::Genre ( ) const

Get the genre as human readable string.

Returns
The genre.

◆ GenreDescription()

std::string CPVREpgInfoTag::GenreDescription ( ) const

Get the genre description of this event.

Returns
The genre.

◆ GenreSubType()

int CPVREpgInfoTag::GenreSubType ( ) const

Get the genre subtype ID of this event.

Returns
The genre subtype ID.

◆ GenreType()

int CPVREpgInfoTag::GenreType ( ) const

Get the genre type ID of this event.

Returns
The genre type ID.

◆ GetCastLabel()

const std::string CPVREpgInfoTag::GetCastLabel ( ) const

Get the cast of this event as formatted string.

Returns
The cast label.

◆ GetDirectorsLabel()

const std::string CPVREpgInfoTag::GetDirectorsLabel ( ) const

Get the director(s) of this event as formatted string.

Returns
The directors label.

◆ GetDuration()

int CPVREpgInfoTag::GetDuration ( ) const

Get the duration of this event in seconds.

Returns
The duration.

◆ GetEdl()

std::vector< PVR_EDL_ENTRY > CPVREpgInfoTag::GetEdl ( ) const

Retrieve the edit decision list (EDL) of an EPG tag.

Returns
The edit decision list (empty on error)

◆ GetGenresLabel()

const std::string CPVREpgInfoTag::GetGenresLabel ( ) const

Get the genre(s) of this event as formatted string.

Returns
The genres label.

◆ GetWritersLabel()

const std::string CPVREpgInfoTag::GetWritersLabel ( ) const

Get the writer(s) of this event as formatted string.

Returns
The writers label.

◆ IconPath()

std::string CPVREpgInfoTag::IconPath ( ) const

Get the path to the icon for this event used by Kodi.

Returns
The path to the icon

◆ IMDBNumber()

std::string CPVREpgInfoTag::IMDBNumber ( ) const

Get the imdbnumber of this event.

Returns
The imdbnumber.

◆ IsActive()

bool CPVREpgInfoTag::IsActive ( ) const

Check if this event is currently active.

Returns
True if it's active, false otherwise.

◆ IsFinale()

bool CPVREpgInfoTag::IsFinale ( ) const

Check whether this tag will be flagged as a finale.

Returns
True if this tag will be flagged as a finale, false otherwise

◆ IsGapTag()

bool CPVREpgInfoTag::IsGapTag ( ) const

Check whether this event is a real event or a gap in the EPG timeline.

Returns
True if this event is a gap, false otherwise.

◆ IsLive()

bool CPVREpgInfoTag::IsLive ( ) const

Check whether this tag will be flagged as live.

Returns
True if this tag will be flagged as live, false otherwise

◆ IsNew()

bool CPVREpgInfoTag::IsNew ( ) const

Check whether this tag will be flagged as new.

Returns
True if this tag will be flagged as new, false otherwise

◆ IsParentalLocked()

bool CPVREpgInfoTag::IsParentalLocked ( ) const

Check whether this event is parental locked.

Returns
True if whether this event is parental locked, false otherwise.

◆ IsPlayable()

bool CPVREpgInfoTag::IsPlayable ( ) const

Check if this event can be played.

Returns
True if it can be played, false otherwise.

◆ IsPremiere()

bool CPVREpgInfoTag::IsPremiere ( ) const

Check whether this tag will be flagged as a premiere.

Returns
True if this tag will be flagged as a premiere, false otherwise

◆ IsRadio()

bool CPVREpgInfoTag::IsRadio ( ) const

Check whether this tag is associated with a radion or TV channel.

Returns
True if this tag is associated with a radio channel, false otherwise.

◆ IsRecordable()

bool CPVREpgInfoTag::IsRecordable ( ) const

Check if this event can be recorded.

Returns
True if it can be recorded, false otherwise.

◆ IsSeries()

bool CPVREpgInfoTag::IsSeries ( ) const

Check whether this tag has any series attributes.

Returns
True if this tag has any series attributes, false otherwise

◆ IsUpcoming()

bool CPVREpgInfoTag::IsUpcoming ( ) const

Check if this event is in the future.

Returns
True when this event is an upcoming event, false otherwise.

◆ operator!=()

bool CPVREpgInfoTag::operator!= ( const CPVREpgInfoTag & right) const

◆ operator==()

bool CPVREpgInfoTag::operator== ( const CPVREpgInfoTag & right) const

◆ OriginalTitle()

std::string CPVREpgInfoTag::OriginalTitle ( ) const

Get the original title of this event.

Returns
The original title.

◆ ParentalRating()

int CPVREpgInfoTag::ParentalRating ( ) const

Get the parental rating of this event.

Returns
The parental rating.

◆ ParentalRatingCode()

std::string CPVREpgInfoTag::ParentalRatingCode ( ) const

Get the parental rating code of this event.

Returns
The parental rating code.

◆ Path()

std::string CPVREpgInfoTag::Path ( ) const

The path to this event.

Returns
The path.

◆ Plot()

std::string CPVREpgInfoTag::Plot ( ) const

Get the plot of this event.

Returns
The plot.

◆ PlotOutline()

std::string CPVREpgInfoTag::PlotOutline ( ) const

Get the plot outline of this event.

Returns
The plot outline.

◆ Progress()

int CPVREpgInfoTag::Progress ( ) const

Get the progress of this tag in seconds.

Returns
The current progress of this tag in seconds.

◆ ProgressPercentage()

float CPVREpgInfoTag::ProgressPercentage ( ) const

Get the progress of this tag in percent.

Returns
The current progress of this tag.

◆ QueuePersistQuery()

bool CPVREpgInfoTag::QueuePersistQuery ( const std::shared_ptr< CPVREpgDatabase > & database)

Write query to persist this tag in the query queue of the given database.

Parameters
databaseThe database.
Returns
True on success, false otherwise.

◆ Serialize()

void CPVREpgInfoTag::Serialize ( CVariant & value) const
overridevirtual

Implements ISerializable.

◆ SeriesLink()

std::string CPVREpgInfoTag::SeriesLink ( ) const

The series link for this event.

Returns
The series link or empty string, if not available.

◆ SeriesNumber()

int CPVREpgInfoTag::SeriesNumber ( ) const

The series number of this event.

Returns
The series number.

◆ SetChannelData()

void CPVREpgInfoTag::SetChannelData ( const std::shared_ptr< CPVREpgChannelData > & data)

Set data for the channel linked to this EPG infotag.

Parameters
dataThe channel data.

◆ SetEndFromUTC()

void CPVREpgInfoTag::SetEndFromUTC ( const CDateTime & end)

Change the event's end time.

Parameters
endThe new end time.

◆ SetEpgID()

void CPVREpgInfoTag::SetEpgID ( int iEpgID)

Sets the EPG id for this event.

Parameters
iEpgIDThe EPG id.

◆ SetUniqueBroadcastID()

void CPVREpgInfoTag::SetUniqueBroadcastID ( unsigned int iUniqueBroadcastID)

Change the unique broadcast ID of this event.

Parameters
iUniqueBroadcastIdThe new unique broadcast ID.

◆ StarRating()

int CPVREpgInfoTag::StarRating ( ) const

Get the star rating of this event.

Returns
The star rating.

◆ StartAsLocalTime()

CDateTime CPVREpgInfoTag::StartAsLocalTime ( ) const

Get the event's start time.

Returns
The start time as local time.

◆ StartAsUTC()

CDateTime CPVREpgInfoTag::StartAsUTC ( ) const

Get the event's start time.

Returns
The start time in UTC.

◆ Title()

std::string CPVREpgInfoTag::Title ( ) const

Get the title of this event.

Returns
The title.

◆ Tokenize()

const std::vector< std::string > CPVREpgInfoTag::Tokenize ( const std::string & str)
static

Split the given string into tokens. Interprets occurrences of EPG_STRING_TOKEN_SEPARATOR in the string as separator.

Parameters
strThe string to tokenize.
Returns
the tokens.

◆ UniqueBroadcastID()

unsigned int CPVREpgInfoTag::UniqueBroadcastID ( ) const

Get the unique broadcast ID.

Returns
The unique broadcast ID.

◆ UniqueChannelID()

int CPVREpgInfoTag::UniqueChannelID ( ) const

Get the unique ID of the channel associated with this event.

Returns
The unique channel ID.

◆ Update()

bool CPVREpgInfoTag::Update ( const CPVREpgInfoTag & tag,
bool bUpdateBroadcastId = true )

Update the information in this tag with the info in the given tag.

Parameters
tagThe new info.
bUpdateBroadcastIdIf set to false, the tag BroadcastId (locally unique) will not be checked/updated
Returns
True if something changed, false otherwise.

◆ WasActive()

bool CPVREpgInfoTag::WasActive ( ) const

Check if this event is in the past.

Returns
True when this event has already passed, false otherwise.

◆ Writers()

const std::vector< std::string > CPVREpgInfoTag::Writers ( ) const

Get the writer(s) of this event.

Returns
The writer(s).

◆ Year()

int CPVREpgInfoTag::Year ( ) const

Get the year of this event.

Returns
The year.

Friends And Related Symbol Documentation

◆ CPVREpgDatabase

friend class CPVREpgDatabase
friend

Member Data Documentation

◆ IMAGE_OWNER_PATTERN

const std::string CPVREpgInfoTag::IMAGE_OWNER_PATTERN = "epgtag_{}"
static

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