Kodi Development  20.0
for Binary and Script based Add-Ons

Detailed Description

PVR add-on timer type
Representation of a timer event.

The related values here are automatically initiated to defaults and need only be set if supported and used.


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

Name Type Set call Get call Usage
Client index unsigned int SetClientIndex GetClientIndex required to set
State PVR_TIMER_STATE SetState GetState required to set
Type unsigned int SetTimerType GetTimerType required to set
Title std::string SetTitle GetTitle required to set
Parent client index unsigned int SetParentClientIndex GetParentClientIndex optional
Client channel unique identifier int SetClientChannelUid GetClientChannelUid optional
Start time time_t SetStartTime GetStartTime optional
End time time_t SetEndTime GetEndTime optional
Start any time bool SetStartAnyTime GetStartAnyTime optional
End any time bool SetEndAnyTime GetEndAnyTime optional
EPG search string std::string SetEPGSearchString GetEPGSearchString optional
Full text EPG search bool SetFullTextEpgSearch GetFullTextEpgSearch optional
Recording store directory std::string SetDirectory GetDirectory optional
Timer priority int SetPriority GetPriority optional
Timer lifetime int SetLifetime GetLifetime optional
Max recordings int SetMaxRecordings GetMaxRecordings optional
Recording group unsigned int SetRecordingGroup GetRecordingGroup optional
First start day time_t SetFirstDay GetFirstDay optional
Used timer weekdays unsigned int SetWeekdays GetWeekdays optional
Prevent duplicate episodes unsigned int SetPreventDuplicateEpisodes GetPreventDuplicateEpisodes optional
EPG unique identifier unsigned int SetEPGUid GetEPGUid optional
Margin start unsigned int SetMarginStart GetMarginStart optional
Margin end unsigned int SetMarginEnd GetMarginEnd optional
Genre type int SetGenreType GetGenreType optional
Genre sub type int SetGenreSubType GetGenreSubType optional
Series link std::string SetSeriesLink GetSeriesLink optional

Modules

 Value Help
 
 class PVRTimersResultSet
 PVR add-on timer transfer class
To transfer the content of kodi::addon::CInstancePVRClient::GetTimers().
 

Function Documentation

◆ SetClientIndex()

void SetClientIndex ( unsigned int  clientIndex)
inline

required
The index of this timer given by the client.

PVR_TIMER_NO_CLIENT_INDEX indicates that the index was not yet set by the client, for example for new timers created by Kodi and passed the first time to the client. A valid index must be greater than PVR_TIMER_NO_CLIENT_INDEX.

◆ GetClientIndex()

unsigned int GetClientIndex ( ) const
inline

To get with SetClientIndex changed values.

◆ SetState()

void SetState ( PVR_TIMER_STATE  state)
inline

required
The state of this timer.

Note
PVR_TIMER_STATE_NEW is default.

Example:

Definition: Timers.h:39
@ PVR_TIMER_STATE_RECORDING
2 : The timer is currently recordings.
Definition: pvr_timers.h:303
void SetState(PVR_TIMER_STATE state)
required The state of this timer.
Definition: Timers.h:135

◆ GetState()

PVR_TIMER_STATE GetState ( ) const
inline

To get with SetState changed values.

◆ SetTimerType()

void SetTimerType ( unsigned int  timerType)
inline

required
The type of this timer.

It is private to the addon and can be freely defined by the addon. The value must be greater than PVR_TIMER_TYPE_NONE.

Kodi does not interpret this value (except for checking for PVR_TIMER_TYPE_NONE), but will pass the right id to the addon with every PVRTimer instance, thus the addon easily can determine the timer type.

Note
PVR_TIMER_TYPE_NONE is default.

Example:

tag.SetTimerType(123);
void SetTimerType(unsigned int timerType)
required The type of this timer.
Definition: Timers.h:161

◆ GetTimerType()

unsigned int GetTimerType ( ) const
inline

To get with SetTimerType changed values.

◆ SetTitle()

void SetTitle ( const std::string &  title)
inline

required
A title for this timer.

◆ GetTitle()

std::string GetTitle ( ) const
inline

To get with SetTitle changed values.

◆ SetParentClientIndex()

void SetParentClientIndex ( unsigned int  parentClientIndex)
inline

optional
For timers scheduled by a repeating timer.

The index of the repeating timer that scheduled this timer (it's clientIndex value). Use PVR_TIMER_NO_PARENT to indicate that this timer was no scheduled by a repeating timer.

◆ GetParentClientIndex()

unsigned int GetParentClientIndex ( ) const
inline

To get with SetParentClientIndex changed values.

◆ SetClientChannelUid()

void SetClientChannelUid ( int  clientChannelUid)
inline

optional
Unique identifier of the channel to record on.

PVR_TIMER_ANY_CHANNEL will denote "any channel", not a specific one. PVR_CHANNEL_INVALID_UID denotes that channel uid is not available.

◆ GetClientChannelUid()

int GetClientChannelUid ( ) const
inline

To get with SetClientChannelUid changed values.

◆ SetStartTime()

void SetStartTime ( time_t  startTime)
inline

optional
Start time of the recording in UTC.

Instant timers that are sent to the add-on by Kodi will have this value set to 0.

◆ GetStartTime()

time_t GetStartTime ( ) const
inline

To get with SetStartTime changed values.

◆ SetEndTime()

void SetEndTime ( time_t  endTime)
inline

optional
End time of the recording in UTC.

◆ GetEndTime()

time_t GetEndTime ( ) const
inline

To get with SetEndTime changed values.

◆ SetStartAnyTime()

void SetStartAnyTime ( bool  startAnyTime)
inline

optional
For EPG based (not Manual) timers indicates startTime does not apply.

Default = false.

◆ GetStartAnyTime()

bool GetStartAnyTime ( ) const
inline

To get with SetStartAnyTime changed values.

◆ SetEndAnyTime()

void SetEndAnyTime ( bool  endAnyTime)
inline

optional
For EPG based (not Manual) timers indicates endTime does not apply.

Default = false

◆ GetEndAnyTime()

bool GetEndAnyTime ( ) const
inline

To get with SetEndAnyTime changed values.

◆ SetEPGSearchString()

void SetEPGSearchString ( const std::string &  epgSearchString)
inline

optional
A string used to search epg data for repeating epg-based timers.

Format is backend-dependent, for example regexp.

◆ GetEPGSearchString()

std::string GetEPGSearchString ( ) const
inline

To get with SetEPGSearchString changed values.

◆ SetFullTextEpgSearch()

void SetFullTextEpgSearch ( bool  fullTextEpgSearch)
inline

optional
Indicates, whether SetEPGSearchString() is to match against the epg episode title only or also against "other" epg data (backend-dependent).

◆ GetFullTextEpgSearch()

bool GetFullTextEpgSearch ( ) const
inline

To get with SetFullTextEpgSearch changed values.

◆ SetDirectory()

void SetDirectory ( const std::string &  directory)
inline

optional
The (relative) directory where the recording will be stored in.

◆ GetDirectory()

std::string GetDirectory ( ) const
inline

To get with SetDirectory changed values.

◆ SetSummary()

void SetSummary ( const std::string &  summary)
inline

optional
The summary for this timer.

◆ GetSummary()

std::string GetSummary ( ) const
inline

To get with SetDirectory changed values.

◆ SetPriority()

void SetPriority ( int  priority)
inline

optional
The priority of this timer.

◆ GetPriority()

int GetPriority ( ) const
inline

To get with SetPriority changed values.

◆ SetLifetime()

void SetLifetime ( int  priority)
inline

optional
Lifetime of recordings created by this timer.

Value > 0 days after which recordings will be deleted by the backend, < 0 addon defined integer list reference, == 0 disabled.

◆ GetLifetime()

int GetLifetime ( ) const
inline

To get with SetLifetime changed values.

◆ SetMaxRecordings()

void SetMaxRecordings ( int  maxRecordings)
inline

optional
Maximum number of recordings this timer shall create.

Value > 0 number of recordings, < 0 addon defined integer list reference, == 0 disabled.

◆ GetMaxRecordings()

int GetMaxRecordings ( ) const
inline

To get with SetMaxRecordings changed values.

◆ SetRecordingGroup()

void SetRecordingGroup ( unsigned int  recordingGroup)
inline

optional
Integer ref to addon/backend defined list of recording groups.

◆ GetRecordingGroup()

unsigned int GetRecordingGroup ( ) const
inline

To get with SetRecordingGroup changed values.

◆ SetFirstDay()

void SetFirstDay ( time_t  firstDay)
inline

optional
The first day this timer is active, for repeating timers.

◆ GetFirstDay()

time_t GetFirstDay ( ) const
inline

To get with SetFirstDay changed values.

◆ SetWeekdays()

void SetWeekdays ( unsigned int  weekdays)
inline

optional
Week days, for repeating timers (see PVR_WEEKDAY_* constant values)

Note
PVR_WEEKDAY_NONE is default.

Example:

...
kodi::addon::PVRTimer tag;
...
@ PVR_WEEKDAY_SATURDAY
0010 0000 : To select Saturday.
Definition: pvr_timers.h:271
@ PVR_WEEKDAY_MONDAY
0000 0001 : To select Monday.
Definition: pvr_timers.h:256

◆ GetWeekdays()

unsigned int GetWeekdays ( ) const
inline

To get with SetFirstDay changed values.

◆ SetPreventDuplicateEpisodes()

void SetPreventDuplicateEpisodes ( unsigned int  preventDuplicateEpisodes)
inline

optional
Prevent duplicate episodes.

Should 1 if backend should only record new episodes in case of a repeating epg-based timer, 0 if all episodes shall be recorded (no duplicate detection).

Actual algorithm for duplicate detection is defined by the backend. Addons may define own values for different duplicate detection algorithms, thus this is not just a bool.

◆ GetPreventDuplicateEpisodes()

unsigned int GetPreventDuplicateEpisodes ( ) const
inline

To get with SetPreventDuplicateEpisodes changed values.

◆ SetEPGUid()

void SetEPGUid ( unsigned int  epgUid)
inline

optional
EPG event id associated with this timer. Event ids must be unique for a channel.

Valid ids must be greater than EPG_TAG_INVALID_UID.

◆ GetEPGUid()

unsigned int GetEPGUid ( ) const
inline

To get with SetEPGUid changed values.

◆ SetMarginStart()

void SetMarginStart ( unsigned int  marginStart)
inline

optional
If set, the backend starts the recording selected minutes before SetStartTime.

◆ GetMarginStart()

unsigned int GetMarginStart ( ) const
inline

To get with SetMarginStart changed values.

◆ SetMarginEnd()

void SetMarginEnd ( unsigned int  marginEnd)
inline

optional
If set, the backend ends the recording selected minutes after SetEndTime.

◆ GetMarginEnd()

unsigned int GetMarginEnd ( ) const
inline

To get with SetMarginEnd changed values.

◆ SetGenreType()

void SetGenreType ( int  genreType)
inline

optional
Genre type.


Example:

...
kodi::addon::PVRTimer tag;
...
@ EPG_EVENT_CONTENTMASK_MOVIEDRAMA
0x10 : Movie/Drama. See EPG_EVENT_CONTENTSUBMASK_MOVIEDRAMA about related sub types.
Definition: pvr_epg.h:69
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.

◆ GetGenreType()

int GetGenreType ( ) const
inline

To get with SetGenreType changed values.

◆ SetGenreSubType()

void 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

Example:

...
kodi::addon::PVRTimer tag;
...
@ 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

◆ GetGenreSubType()

int GetGenreSubType ( ) const
inline

To get with SetGenreType changed values.

◆ SetSeriesLink()

void SetSeriesLink ( const std::string &  seriesLink)
inline

optional
Series link for this timer.

If set for an epg-based timer rule, matching events will be found by checking with here, instead of SetTitle() (and SetFullTextEpgSearch()).

◆ GetSeriesLink()

std::string GetSeriesLink ( ) const
inline

To get with SetSeriesLink changed values.