added some tokens in displaymenuschedules

This commit is contained in:
louis 2014-10-04 13:32:09 +02:00
parent 688ad9698e
commit e14982a4be
4 changed files with 14 additions and 3 deletions

View File

@ -31,12 +31,14 @@
{duration} duration of event {duration} duration of event
{current} true if item is currently selected {current} true if item is currently selected
{separator} true if item is a list separator {separator} true if item is a list separator
{channelid} ChannelID as path to display channel logo {channelname} Channel Name (for what's on now and next)
{channelid} ChannelID as path to display channel logo (for what's on now and next)
{whatson} true if menu "What's on" is displayed {whatson} true if menu "What's on" is displayed
{whatsonnow} true if menu "What's on now" is displayed {whatsonnow} true if menu "What's on now" is displayed
{whatsonnext} true if menu "What's on next" is displayed {whatsonnext} true if menu "What's on next" is displayed
{timerpartitial} true if partitial timer is set for the event {timerpartitial} true if partitial timer is set for the event
{timerfull} true if full timer is set for the event {timerfull} true if full timer is set for the event
{hasVPS} true if event has VPS information
--> -->
<listelement> <listelement>
<!-- Background --> <!-- Background -->

View File

@ -40,12 +40,14 @@
{duration} duration of event {duration} duration of event
{current} true if item is currently selected {current} true if item is currently selected
{separator} true if item is a list separator {separator} true if item is a list separator
{channelid} ChannelID as path to display channel logo {channelname} Channel Name (for what's on now and next)
{channelid} ChannelID as path to display channel logo (for what's on now and next)
{whatson} true if menu "What's on" is displayed {whatson} true if menu "What's on" is displayed
{whatsonnow} true if menu "What's on now" is displayed {whatsonnow} true if menu "What's on now" is displayed
{whatsonnext} true if menu "What's on next" is displayed {whatsonnext} true if menu "What's on next" is displayed
{timerpartitial} true if partitial timer is set for the event {timerpartitial} true if partitial timer is set for the event
{timerfull} true if full timer is set for the event {timerfull} true if full timer is set for the event
{hasVPS} true if event has VPS information
--> -->
<listelement> <listelement>
<!-- background and foreground--> <!-- background and foreground-->

View File

@ -26,12 +26,14 @@
{duration} duration of event {duration} duration of event
{current} true if item is currently selected {current} true if item is currently selected
{separator} true if item is a list separator {separator} true if item is a list separator
{channelid} ChannelID as path to display channel logo {channelname} Channel Name (for what's on now and next)
{channelid} ChannelID as path to display channel logo (for what's on now and next)
{whatson} true if menu "What's on" is displayed {whatson} true if menu "What's on" is displayed
{whatsonnow} true if menu "What's on now" is displayed {whatsonnow} true if menu "What's on now" is displayed
{whatsonnext} true if menu "What's on next" is displayed {whatsonnext} true if menu "What's on next" is displayed
{timerpartitial} true if partitial timer is set for the event {timerpartitial} true if partitial timer is set for the event
{timerfull} true if full timer is set for the event {timerfull} true if full timer is set for the event
{hasVPS} true if event has VPS information
--> -->
<listelement> <listelement>
</listelement> </listelement>

View File

@ -314,15 +314,20 @@ void cDisplayMenuItemSchedulesView::SetTokens(void) {
intTokens.insert(pair<string,int>("elapsed", 0)); intTokens.insert(pair<string,int>("elapsed", 0));
} }
intTokens.insert(pair<string,int>("duration", event->Duration() / 60)); intTokens.insert(pair<string,int>("duration", event->Duration() / 60));
intTokens.insert(pair<string,int>("hasVPS", (bool)event->Vps()));
} else { } else {
stringTokens.insert(pair<string,string>("title", event->Title() ? ParseSeparator(event->Title()) : "")); stringTokens.insert(pair<string,string>("title", event->Title() ? ParseSeparator(event->Title()) : ""));
} }
} }
if (channel) { if (channel) {
stringTokens.insert(pair<string,string>("channelname", channel->Name() ? channel->Name() : ""));
stringTokens.insert(pair<string,string>("channelid", *(channel->GetChannelID().ToString()))); stringTokens.insert(pair<string,string>("channelid", *(channel->GetChannelID().ToString())));
if (!event && !selectable) { if (!event && !selectable) {
stringTokens.insert(pair<string,string>("title", channel->Name() ? ParseSeparator(channel->Name()) : "")); stringTokens.insert(pair<string,string>("title", channel->Name() ? ParseSeparator(channel->Name()) : ""));
} }
} else {
stringTokens.insert(pair<string,string>("channelname", ""));
stringTokens.insert(pair<string,string>("channelid", ""));
} }
} }