added {channellogoexists} Token everywhere where {channelid} is available

This commit is contained in:
louis 2014-11-29 11:55:53 +01:00
parent 76ab3e4cef
commit af864fd449
10 changed files with 33 additions and 7 deletions

View File

@ -96,3 +96,4 @@ Version 0.0.6
- using VDRs OSD Language instead of system language
- added compatibility to librsvg >= 2.36.1
- added onpause and onpausemodeonly in displayreplay
- added {channellogoexists} Token everywhere where {channelid} is available

View File

@ -120,6 +120,7 @@
{devices[signalquality]} signalstrength of devcie
{devices[channelnumber]} number of the currently tuned channel
{devices[channelname]} name of the currently tuned channel
{devices[channellogoexists]} true if a channel logo exists
{devices[channelid]} ID of the currently tuned channel
{devices[source]} source of the currently tuned channel
-->

View File

@ -4,6 +4,7 @@
{nummenuitem} number of item in list, starts with 1
{number} number of the displayed channel
{name} name of the displayed channel
{channellogoexists} true if a channel logo exists
{channelid} ChannelID as path to display channel logo
{transponder} Transponder of channel
{frequency} Frequency of channel
@ -30,6 +31,7 @@
{menuitemheight} height of according menu item
{number} number of the displayed channel
{name} name of the displayed channel
{channellogoexists} true if a channel logo exists
{channelid} ChannelID as path to display channel logo
{transponder} Transponder of channel
{frequency} Frequency of channel

View File

@ -17,6 +17,7 @@
{vps} vps description string
{channelname} Channelname of event
{channelnumber} Channelnumber of event
{channellogoexists} true if a channel logo exists
{channelid} ChannelID as path to display channel logo
{ismovie} true if event is scraped as a movie
{isseries} true if event is scraped as a series
@ -51,6 +52,7 @@
{durationhours} duration, full hours
{durationminutes} duration, rest of minutes
{vps} vps description string
{channellogoexists} true if a channel logo exists
{channelid} ChannelID as path to display channel logo
{hasreruns} true if reruns of this event are found
{reruns[]} array with reruns

View File

@ -44,6 +44,7 @@
{devices[signalquality]} signalstrength of devcie
{devices[channelnumber]} number of the currently tuned channel
{devices[channelname]} name of the currently tuned channel
{devices[channellogoexists]} true if a channel logo exists
{devices[channelid]} ID of the currently tuned channel
{devices[source]} source of the currently tuned channel
-->

View File

@ -11,6 +11,7 @@
{monthname} Month, three letter abbrevation
{year} Year (4 digits)
{channelname} Name of channel which is set for the timer
{channellogoexists} true if a channel logo exists
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
{channelnumber} Number of channel which is set for the timer
{eventtitle} Title of corresponding event
@ -40,6 +41,7 @@
{monthname} Month, three letter abbrevation
{year} Year (4 digits)#
{channelname} Name of channel which is set for the timer
{channellogoexists} true if a channel logo exists
{channelid} ID of channel which is set for the timer (for dispalying channel logo)
{channelnumber} Number of channel which is set for the timer
{eventtitle} Title of corresponding event

View File

@ -127,7 +127,9 @@ void cDisplayMenuDetailView::SetTokens(void) {
intTokens.insert(pair<string, int>("daynumeric", sStartTime->tm_mday));
intTokens.insert(pair<string, int>("month", sStartTime->tm_mon+1));
stringTokens.insert(pair<string,string>("channelid", *(event->ChannelID().ToString())));
string channelID = *(event->ChannelID().ToString());
stringTokens.insert(pair<string,string>("channelid", channelID));
intTokens.insert(pair<string, int>("channellogoexists", imgCache->LogoExists(channelID)));
bool isRunning = false;
time_t now = time(NULL);
@ -658,7 +660,9 @@ void cDisplayMenuDetailView::DrawHeader(void) {
headerStringTokens.insert(pair<string,string>("channelname", ""));
headerIntTokens.insert(pair<string, int>("channelnumber", 0));
}
headerStringTokens.insert(pair<string,string>("channelid", *(event->ChannelID().ToString())));
string channelID = *(channel->GetChannelID().ToString());
headerStringTokens.insert(pair<string,string>("channelid", channelID));
headerIntTokens.insert(pair<string, int>("channellogoexists", imgCache->LogoExists(channelID)));
bool isRunning = false;
time_t now = time(NULL);

View File

@ -249,7 +249,9 @@ void cDisplayMenuItemCurrentChannelView::Render(void) {
intTokens.insert(pair<string,int>("frequency", channel->Frequency()));
stringTokens.insert(pair<string,string>("name", channel->Name() ? channel->Name() : ""));
stringTokens.insert(pair<string,string>("channelid", *(channel->GetChannelID().ToString())));
string channelID = *(channel->GetChannelID().ToString());
stringTokens.insert(pair<string,string>("channelid", channelID));
intTokens.insert(pair<string, int>("channellogoexists", imgCache->LogoExists(channelID)));
//Channel Source Information
const cSource *source = Sources.Get(channel->Source());
@ -456,11 +458,14 @@ void cDisplayMenuItemCurrentTimerView::Render(void) {
const cChannel *channel = timer->Channel();
if (channel) {
stringTokens.insert(pair<string,string>("channelname", channel->Name() ? channel->Name() : ""));
stringTokens.insert(pair<string,string>("channelid", *(channel->GetChannelID().ToString())));
string channelID = *(channel->GetChannelID().ToString());
stringTokens.insert(pair<string,string>("channelid", channelID));
intTokens.insert(pair<string, int>("channellogoexists", imgCache->LogoExists(channelID)));
intTokens.insert(pair<string,int>("channelnumber", channel->Number()));
} else {
stringTokens.insert(pair<string,string>("channelname", ""));
stringTokens.insert(pair<string,string>("channelid", ""));
intTokens.insert(pair<string, int>("channellogoexists", 0));
intTokens.insert(pair<string,int>("channelnumber", 0));
}

View File

@ -416,7 +416,9 @@ void cDisplayMenuItemChannelsView::SetTokens(void) {
intTokens.insert(pair<string,int>("frequency", channel->Frequency()));
stringTokens.insert(pair<string,string>("name", channel->Name() ? channel->Name() : ""));
stringTokens.insert(pair<string,string>("channelid", *(channel->GetChannelID().ToString())));
string channelID = *(channel->GetChannelID().ToString());
stringTokens.insert(pair<string,string>("channelid", channelID));
intTokens.insert(pair<string, int>("channellogoexists", imgCache->LogoExists(channelID)));
//Channel Source Information
const cSource *source = Sources.Get(channel->Source());
@ -560,11 +562,14 @@ void cDisplayMenuItemTimersView::SetTokens(void) {
const cChannel *channel = timer->Channel();
if (channel) {
stringTokens.insert(pair<string,string>("channelname", channel->Name() ? channel->Name() : ""));
stringTokens.insert(pair<string,string>("channelid", *(channel->GetChannelID().ToString())));
string channelID = *(channel->GetChannelID().ToString());
stringTokens.insert(pair<string,string>("channelid", channelID));
intTokens.insert(pair<string, int>("channellogoexists", imgCache->LogoExists(channelID)));
intTokens.insert(pair<string,int>("channelnumber", channel->Number()));
} else {
stringTokens.insert(pair<string,string>("channelname", ""));
stringTokens.insert(pair<string,string>("channelid", ""));
intTokens.insert(pair<string, int>("channellogoexists", 0));
intTokens.insert(pair<string,int>("channelnumber", 0));
}

View File

@ -133,12 +133,15 @@ bool cViewHelpers::SetDevices(bool initial, map<string,int> *intTokens, vector<m
strChanNum << channel->Number();
deviceVals.insert(pair< string, string >("devices[channelnumber]", strChanNum.str()));
deviceVals.insert(pair< string, string >("devices[channelname]", channel->Name()));
deviceVals.insert(pair< string, string >("devices[channelid]", *(channel->GetChannelID().ToString())));
string channelID = *(channel->GetChannelID().ToString());
deviceVals.insert(pair< string, string >("devices[channelid]", channelID));
deviceVals.insert(pair< string, string >("devices[channellogoexists]", imgCache->LogoExists(channelID) ? "1" : "0"));
deviceVals.insert(pair< string, string >("devices[istuned]", "1"));
} else {
deviceVals.insert(pair< string, string >("devices[channelnumber]", "0"));
deviceVals.insert(pair< string, string >("devices[channelname]", ""));
deviceVals.insert(pair< string, string >("devices[channelid]", ""));
deviceVals.insert(pair< string, string >("devices[channellogoexists]", "0"));
deviceVals.insert(pair< string, string >("devices[istuned]", "0"));
}