Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches

PVR add-on EPG data tag
Representation of an EPG event. More...

Topics

 Value Help
 
 class PVREPGTagsResultSet
 PVR add-on EPG entry transfer class
To transfer the content of kodi::addon::CInstancePVRClient::GetEPGForChannel().
 

Classes

class  kodi::addon::PVREPGTag
 

Functions

void kodi::addon::PVREPGTag::SetUniqueBroadcastId (unsigned int uniqueBroadcastId)
 required
Identifier for this event. Event uids must be unique for a channel. Valid uids must be greater than EPG_TAG_INVALID_UID.
 
unsigned int kodi::addon::PVREPGTag::GetUniqueBroadcastId () const
 To get with SetUniqueBroadcastId changed values.
 
void kodi::addon::PVREPGTag::SetUniqueChannelId (unsigned int uniqueChannelId)
 required
Unique identifier of the channel this event belongs to.
 
unsigned int kodi::addon::PVREPGTag::GetUniqueChannelId () const
 To get with SetUniqueChannelId changed values.
 
void kodi::addon::PVREPGTag::SetTitle (const std::string &title)
 required
This event's title.
 
std::string kodi::addon::PVREPGTag::GetTitle () const
 To get with SetTitle changed values.
 
void kodi::addon::PVREPGTag::SetStartTime (time_t startTime)
 required
Start time in UTC.
 
time_t kodi::addon::PVREPGTag::GetStartTime () const
 To get with SetStartTime changed values.
 
void kodi::addon::PVREPGTag::SetEndTime (time_t endTime)
 required
End time in UTC.
 
time_t kodi::addon::PVREPGTag::GetEndTime () const
 To get with SetEndTime changed values.
 
void kodi::addon::PVREPGTag::SetPlotOutline (const std::string &plotOutline)
 optional
Plot outline name.
 
std::string kodi::addon::PVREPGTag::GetPlotOutline () const
 To get with SetPlotOutline changed values.
 
void kodi::addon::PVREPGTag::SetPlot (const std::string &plot)
 optional
Plot name.
 
std::string kodi::addon::PVREPGTag::GetPlot () const
 To get with GetPlot changed values.
 
void kodi::addon::PVREPGTag::SetOriginalTitle (const std::string &originalTitle)
 optional
Original title.
 
std::string kodi::addon::PVREPGTag::GetOriginalTitle () const
 To get with SetOriginalTitle changed values.
 
void kodi::addon::PVREPGTag::SetCast (const std::string &cast)
 optional
Cast name(s).
 
std::string kodi::addon::PVREPGTag::GetCast () const
 To get with SetCast changed values.
 
void kodi::addon::PVREPGTag::SetDirector (const std::string &director)
 optional
Director name(s).
 
std::string kodi::addon::PVREPGTag::GetDirector () const
 To get with SetDirector changed values.
 
void kodi::addon::PVREPGTag::SetWriter (const std::string &writer)
 optional
Writer name(s).
 
std::string kodi::addon::PVREPGTag::GetWriter () const
 To get with SetDirector changed values.
 
void kodi::addon::PVREPGTag::SetYear (int year)
 optional
Year.
 
int kodi::addon::PVREPGTag::GetYear () const
 To get with SetYear changed values.
 
void kodi::addon::PVREPGTag::SetIMDBNumber (const std::string &IMDBNumber)
 optional
IMDB identification number.
 
std::string kodi::addon::PVREPGTag::GetIMDBNumber () const
 To get with SetIMDBNumber changed values.
 
void kodi::addon::PVREPGTag::SetIconPath (const std::string &iconPath)
 optional
Icon path.
 
std::string kodi::addon::PVREPGTag::GetIconPath () const
 To get with SetIconPath changed values.
 
void kodi::addon::PVREPGTag::SetGenreType (int genreType)
 optional
Genre type.
 
int kodi::addon::PVREPGTag::GetGenreType () const
 To get with SetGenreType changed values.
 
void kodi::addon::PVREPGTag::SetGenreSubType (int genreSubType)
 optional
Genre sub type.
 
int kodi::addon::PVREPGTag::GetGenreSubType () const
 To get with SetGenreSubType changed values.
 
void kodi::addon::PVREPGTag::SetGenreDescription (const std::string &genreDescription)
 optional
genre. Will be used only when genreType == EPG_GENRE_USE_STRING or genreSubType == EPG_GENRE_USE_STRING.
 
std::string kodi::addon::PVREPGTag::GetGenreDescription () const
 To get with SetGenreDescription changed values.
 
void kodi::addon::PVREPGTag::SetFirstAired (const std::string &firstAired)
 optional
First aired in UTC.
 
std::string kodi::addon::PVREPGTag::GetFirstAired () const
 To get with SetFirstAired changed values.
 
void kodi::addon::PVREPGTag::SetParentalRating (int parentalRating)
 optional
Parental rating.
 
int kodi::addon::PVREPGTag::GetParentalRating () const
 To get with SetParentalRatinge changed values.
 
void kodi::addon::PVREPGTag::SetParentalRatingCode (const std::string &parentalRatingCode)
 required
This event's parental rating code.
 
std::string kodi::addon::PVREPGTag::GetParentalRatingCode () const
 To get with SetParentalRatingCode changed values.
 
void kodi::addon::PVREPGTag::SetStarRating (int starRating)
 optional
Star rating.
 
int kodi::addon::PVREPGTag::GetStarRating () const
 To get with SetStarRating changed values.
 
void kodi::addon::PVREPGTag::SetSeriesNumber (int seriesNumber)
 optional
Series number.
 
int kodi::addon::PVREPGTag::GetSeriesNumber () const
 To get with SetSeriesNumber changed values.
 
void kodi::addon::PVREPGTag::SetEpisodeNumber (int episodeNumber)
 optional
Episode number.
 
int kodi::addon::PVREPGTag::GetEpisodeNumber () const
 To get with SetEpisodeNumber changed values.
 
void kodi::addon::PVREPGTag::SetEpisodePartNumber (int episodePartNumber)
 optional
Episode part number.
 
int kodi::addon::PVREPGTag::GetEpisodePartNumber () const
 To get with SetEpisodePartNumber changed values.
 
void kodi::addon::PVREPGTag::SetEpisodeName (const std::string &episodeName)
 optional
Episode name.
 
std::string kodi::addon::PVREPGTag::GetEpisodeName () const
 To get with SetEpisodeName changed values.
 
void kodi::addon::PVREPGTag::SetFlags (unsigned int flags)
 optional
Bit field of independent flags associated with the EPG entry.
 
unsigned int kodi::addon::PVREPGTag::GetFlags () const
 To get with SetFlags changed values.
 
void kodi::addon::PVREPGTag::SetSeriesLink (const std::string &seriesLink)
 optional
Series link for this event.
 
std::string kodi::addon::PVREPGTag::GetSeriesLink () const
 To get with SetSeriesLink changed values.
 

Detailed Description

PVR add-on EPG data tag
Representation of an EPG event.

Herewith all EPG related data are saved in one class whereby the data can be exchanged with Kodi, or can also be used on the addon to save there.

See EPG methods about usage.


The following table contains values that can be set with class PVREPGTag :

Name Type Set call Get call Usage
Unique broadcast id unsigned int SetUniqueBroadcastId GetUniqueBroadcastId required to set
Unique channel id unsigned int SetUniqueChannelId GetUniqueChannelId required to set
Title std::string SetTitle GetTitle required to set
Start time time_t SetStartTime GetStartTime required to set
End time time_t SetEndTime GetEndTime required to set
Plot outline std::string SetPlotOutline GetPlotOutline optional
Plot std::string SetPlot GetPlot optional
Original title std::string SetOriginalTitle GetOriginalTitle optional
Cast std::string SetCast GetCast optional
Director std::string SetDirector GetDirector optional
Writer std::string SetWriter GetWriter optional
Year int SetYear GetYear optional
IMDB number std::string SetIMDBNumber GetIMDBNumber optional
Icon path std::string SetIconPath GetIconPath optional
Genre type int SetGenreType GetGenreType optional
Genre sub type int SetGenreSubType GetGenreSubType optional
Genre description std::string SetGenreDescription GetGenreDescription optional
First aired time_t SetFirstAired GetFirstAired optional
Parental rating int SetParentalRating GetParentalRating optional
Parental rating code int SetParentalRatingCode GetParentalRatingCode optional
Star rating int SetStarRating GetStarRating optional
Series number int SetSeriesNumber GetSeriesNumber optional
Episode number int SetEpisodeNumber GetEpisodeNumber optional
Episode part number int SetEpisodePartNumber GetEpisodePartNumber optional
Episode name std::string SetEpisodeName GetEpisodeName optional
Flags unsigned int SetFlags GetFlags optional
Series link std::string SetSeriesLink GetSeriesLink optional

Function Documentation

◆ GetCast()

std::string kodi::addon::PVREPGTag::GetCast ( ) const
inline

To get with SetCast changed values.

◆ GetDirector()

std::string kodi::addon::PVREPGTag::GetDirector ( ) const
inline

To get with SetDirector changed values.

◆ GetEndTime()

time_t kodi::addon::PVREPGTag::GetEndTime ( ) const
inline

To get with SetEndTime changed values.

◆ GetEpisodeName()

std::string kodi::addon::PVREPGTag::GetEpisodeName ( ) const
inline

To get with SetEpisodeName changed values.

◆ GetEpisodeNumber()

int kodi::addon::PVREPGTag::GetEpisodeNumber ( ) const
inline

To get with SetEpisodeNumber changed values.

◆ GetEpisodePartNumber()

int kodi::addon::PVREPGTag::GetEpisodePartNumber ( ) const
inline

To get with SetEpisodePartNumber changed values.

◆ GetFirstAired()

std::string kodi::addon::PVREPGTag::GetFirstAired ( ) const
inline

To get with SetFirstAired changed values.

◆ GetFlags()

unsigned int kodi::addon::PVREPGTag::GetFlags ( ) const
inline

To get with SetFlags changed values.

◆ GetGenreDescription()

std::string kodi::addon::PVREPGTag::GetGenreDescription ( ) const
inline

To get with SetGenreDescription changed values.

◆ GetGenreSubType()

int kodi::addon::PVREPGTag::GetGenreSubType ( ) const
inline

To get with SetGenreSubType changed values.

◆ GetGenreType()

int kodi::addon::PVREPGTag::GetGenreType ( ) const
inline

To get with SetGenreType changed values.

◆ GetIconPath()

std::string kodi::addon::PVREPGTag::GetIconPath ( ) const
inline

To get with SetIconPath changed values.

◆ GetIMDBNumber()

std::string kodi::addon::PVREPGTag::GetIMDBNumber ( ) const
inline

To get with SetIMDBNumber changed values.

◆ GetOriginalTitle()

std::string kodi::addon::PVREPGTag::GetOriginalTitle ( ) const
inline

To get with SetOriginalTitle changed values.

◆ GetParentalRating()

int kodi::addon::PVREPGTag::GetParentalRating ( ) const
inline

To get with SetParentalRatinge changed values.

◆ GetParentalRatingCode()

std::string kodi::addon::PVREPGTag::GetParentalRatingCode ( ) const
inline

To get with SetParentalRatingCode changed values.

◆ GetPlot()

std::string kodi::addon::PVREPGTag::GetPlot ( ) const
inline

To get with GetPlot changed values.

◆ GetPlotOutline()

std::string kodi::addon::PVREPGTag::GetPlotOutline ( ) const
inline

To get with SetPlotOutline changed values.

◆ GetSeriesLink()

std::string kodi::addon::PVREPGTag::GetSeriesLink ( ) const
inline

To get with SetSeriesLink changed values.

◆ GetSeriesNumber()

int kodi::addon::PVREPGTag::GetSeriesNumber ( ) const
inline

To get with SetSeriesNumber changed values.

◆ GetStarRating()

int kodi::addon::PVREPGTag::GetStarRating ( ) const
inline

To get with SetStarRating changed values.

◆ GetStartTime()

time_t kodi::addon::PVREPGTag::GetStartTime ( ) const
inline

To get with SetStartTime changed values.

◆ GetTitle()

std::string kodi::addon::PVREPGTag::GetTitle ( ) const
inline

To get with SetTitle changed values.

◆ GetUniqueBroadcastId()

unsigned int kodi::addon::PVREPGTag::GetUniqueBroadcastId ( ) const
inline

To get with SetUniqueBroadcastId changed values.

◆ GetUniqueChannelId()

unsigned int kodi::addon::PVREPGTag::GetUniqueChannelId ( ) const
inline

To get with SetUniqueChannelId changed values.

◆ GetWriter()

std::string kodi::addon::PVREPGTag::GetWriter ( ) const
inline

To get with SetDirector changed values.

◆ GetYear()

int kodi::addon::PVREPGTag::GetYear ( ) const
inline

To get with SetYear changed values.

◆ SetCast()

void kodi::addon::PVREPGTag::SetCast ( const std::string & cast)
inline

optional
Cast name(s).

Note
Use EPG_STRING_TOKEN_SEPARATOR to separate different persons.

◆ SetDirector()

void kodi::addon::PVREPGTag::SetDirector ( const std::string & director)
inline

optional
Director name(s).

Note
Use EPG_STRING_TOKEN_SEPARATOR to separate different persons.

◆ SetEndTime()

void kodi::addon::PVREPGTag::SetEndTime ( time_t endTime)
inline

required
End time in UTC.

Seconds elapsed since 00:00 hours, Jan 1, 1970 UTC.

◆ SetEpisodeName()

void kodi::addon::PVREPGTag::SetEpisodeName ( const std::string & episodeName)
inline

optional
Episode name.

◆ SetEpisodeNumber()

void kodi::addon::PVREPGTag::SetEpisodeNumber ( int episodeNumber)
inline

optional
Episode number.

◆ SetEpisodePartNumber()

void kodi::addon::PVREPGTag::SetEpisodePartNumber ( int episodePartNumber)
inline

optional
Episode part number.

◆ SetFirstAired()

void kodi::addon::PVREPGTag::SetFirstAired ( const std::string & firstAired)
inline

optional
First aired in UTC.

◆ SetFlags()

void kodi::addon::PVREPGTag::SetFlags ( unsigned int flags)
inline

optional
Bit field of independent flags associated with the EPG entry.

See enum EPG_TAG_FLAG for available bit flags.


Here's example about the use of this:

const char struct KODI_ADDON_AUDIODECODER_INFO_TAG * tag
Definition addons/kodi-dev-kit/include/kodi/c-api/addon-instance/AudioDecoder.h:122
Definition addons/kodi-dev-kit/include/kodi/addon-instance/pvr/Epg.h:40
@ EPG_TAG_FLAG_IS_NEW
0000 0010 : This EPG entry will be flagged as new.
Definition pvr_epg.h:552
@ EPG_TAG_FLAG_IS_SERIES
0000 0001 : This EPG entry is part of a series.
Definition pvr_epg.h:549

◆ SetGenreDescription()

void kodi::addon::PVREPGTag::SetGenreDescription ( const std::string & genreDescription)
inline

optional
genre. Will be used only when genreType == EPG_GENRE_USE_STRING or genreSubType == EPG_GENRE_USE_STRING.

Use EPG_STRING_TOKEN_SEPARATOR to separate different genres.

In case of other, not ETSI EN 300 468 conform genre types or something special.


Example:

tag.SetGenreType(EPG_GENRE_USE_STRING);
tag.SetGenreDescription("Action" + EPG_STRING_TOKEN_SEPARATOR + "Thriller");
@ EPG_GENRE_USE_STRING
Used to override standard genre types with a own name about. Set to this value EPG_GENRE_USE_STRIN...
Definition pvr_epg.h:138
#define EPG_STRING_TOKEN_SEPARATOR
Separator to use in strings containing different tokens, for example writers, directors,...
Definition pvr_epg.h:527

◆ SetGenreSubType()

void kodi::addon::PVREPGTag::SetGenreSubType ( int genreSubType)
inline

optional
Genre sub type.

Subtypes groups related to set by SetGenreType:

Main genre type List with available sub genre types
EPG_EVENT_CONTENTMASK_UNDEFINED Nothing, should be 0
EPG_EVENT_CONTENTMASK_MOVIEDRAMA EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA
EPG_EVENT_CONTENTMASK_NEWSCURRENTAFFAIRS EPG_EVENT_CONTENTSUBMASK_NEWSCURRENTAFFAIRS
EPG_EVENT_CONTENTMASK_SHOW EPG_EVENT_CONTENTSUBMASK_SHOW
EPG_EVENT_CONTENTMASK_SPORTS EPG_EVENT_CONTENTSUBMASK_SPORTS
EPG_EVENT_CONTENTMASK_CHILDRENYOUTH EPG_EVENT_CONTENTSUBMASK_CHILDRENYOUTH
EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE
EPG_EVENT_CONTENTMASK_ARTSCULTURE EPG_EVENT_CONTENTSUBMASK_ARTSCULTURE
EPG_EVENT_CONTENTMASK_SOCIALPOLITICALECONOMICS EPG_EVENT_CONTENTSUBMASK_SOCIALPOLITICALECONOMICS
EPG_EVENT_CONTENTMASK_EDUCATIONALSCIENCE EPG_EVENT_CONTENTSUBMASK_EDUCATIONALSCIENCE
EPG_EVENT_CONTENTMASK_LEISUREHOBBIES EPG_EVENT_CONTENTSUBMASK_LEISUREHOBBIES
EPG_EVENT_CONTENTMASK_SPECIAL EPG_EVENT_CONTENTSUBMASK_SPECIAL
EPG_EVENT_CONTENTMASK_USERDEFINED Can be defined by you
EPG_GENRE_USE_STRING Kodi's own value, which declares that the type with SetGenreDescription is given.

Example:

@ EPG_EVENT_CONTENTMASK_MUSICBALLETDANCE
0x60 : Music/Ballet/Dance. See EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE about related sub types.
Definition pvr_epg.h:94
@ EPG_EVENT_CONTENTSUBMASK_MUSICBALLETDANCE_JAZZ
0x4 : Jazz.
Definition pvr_epg.h:333

◆ SetGenreType()

void kodi::addon::PVREPGTag::SetGenreType ( int genreType)
inline

optional
Genre type.


Use EPG_GENRE_USE_STRING if type becomes given by SetGenreDescription.

Note
If confirmed that backend brings the types in ETSI EN 300 468 conform values, can be EPG_EVENT_CONTENTMASK ignored and to set here with backend value.

Example 1:

@ EPG_EVENT_CONTENTMASK_MOVIEDRAMA
0x10 : Movie/Drama. See EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA about related sub types.
Definition pvr_epg.h:69

Example 2 (in case of other, not ETSI EN 300 468 conform genre types):

tag.SetGenreType(EPG_GENRE_USE_STRING);
tag.SetGenreDescription("My special genre name"); // Should use (if possible) kodi::GetLocalizedString(...) to have match user language.

◆ SetIconPath()

void kodi::addon::PVREPGTag::SetIconPath ( const std::string & iconPath)
inline

optional
Icon path.

◆ SetIMDBNumber()

void kodi::addon::PVREPGTag::SetIMDBNumber ( const std::string & IMDBNumber)
inline

optional
IMDB identification number.

◆ SetOriginalTitle()

void kodi::addon::PVREPGTag::SetOriginalTitle ( const std::string & originalTitle)
inline

optional
Original title.

◆ SetParentalRating()

void kodi::addon::PVREPGTag::SetParentalRating ( int parentalRating)
inline

optional
Parental rating.

◆ SetParentalRatingCode()

void kodi::addon::PVREPGTag::SetParentalRatingCode ( const std::string & parentalRatingCode)
inline

required
This event's parental rating code.

◆ SetPlot()

void kodi::addon::PVREPGTag::SetPlot ( const std::string & plot)
inline

optional
Plot name.

◆ SetPlotOutline()

void kodi::addon::PVREPGTag::SetPlotOutline ( const std::string & plotOutline)
inline

optional
Plot outline name.

◆ SetSeriesLink()

void kodi::addon::PVREPGTag::SetSeriesLink ( const std::string & seriesLink)
inline

optional
Series link for this event.

◆ SetSeriesNumber()

void kodi::addon::PVREPGTag::SetSeriesNumber ( int seriesNumber)
inline

optional
Series number.

◆ SetStarRating()

void kodi::addon::PVREPGTag::SetStarRating ( int starRating)
inline

optional
Star rating.

◆ SetStartTime()

void kodi::addon::PVREPGTag::SetStartTime ( time_t startTime)
inline

required
Start time in UTC.

Seconds elapsed since 00:00 hours, Jan 1, 1970 UTC.

◆ SetTitle()

void kodi::addon::PVREPGTag::SetTitle ( const std::string & title)
inline

required
This event's title.

◆ SetUniqueBroadcastId()

void kodi::addon::PVREPGTag::SetUniqueBroadcastId ( unsigned int uniqueBroadcastId)
inline

required
Identifier for this event. Event uids must be unique for a channel. Valid uids must be greater than EPG_TAG_INVALID_UID.

◆ SetUniqueChannelId()

void kodi::addon::PVREPGTag::SetUniqueChannelId ( unsigned int uniqueChannelId)
inline

required
Unique identifier of the channel this event belongs to.

◆ SetWriter()

void kodi::addon::PVREPGTag::SetWriter ( const std::string & writer)
inline

optional
Writer name(s).

Note
Use EPG_STRING_TOKEN_SEPARATOR to separate different persons.

◆ SetYear()

void kodi::addon::PVREPGTag::SetYear ( int year)
inline

optional
Year.