From af864fd4492569b19b956b3082e95fa091b18ed8 Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 29 Nov 2014 11:55:53 +0100 Subject: added {channellogoexists} Token everywhere where {channelid} is available --- views/displaymenuitemcurrentview.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'views/displaymenuitemcurrentview.c') diff --git a/views/displaymenuitemcurrentview.c b/views/displaymenuitemcurrentview.c index 2be72be..58a6118 100644 --- a/views/displaymenuitemcurrentview.c +++ b/views/displaymenuitemcurrentview.c @@ -249,7 +249,9 @@ void cDisplayMenuItemCurrentChannelView::Render(void) { intTokens.insert(pair("frequency", channel->Frequency())); stringTokens.insert(pair("name", channel->Name() ? channel->Name() : "")); - stringTokens.insert(pair("channelid", *(channel->GetChannelID().ToString()))); + string channelID = *(channel->GetChannelID().ToString()); + stringTokens.insert(pair("channelid", channelID)); + intTokens.insert(pair("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("channelname", channel->Name() ? channel->Name() : "")); - stringTokens.insert(pair("channelid", *(channel->GetChannelID().ToString()))); + string channelID = *(channel->GetChannelID().ToString()); + stringTokens.insert(pair("channelid", channelID)); + intTokens.insert(pair("channellogoexists", imgCache->LogoExists(channelID))); intTokens.insert(pair("channelnumber", channel->Number())); } else { stringTokens.insert(pair("channelname", "")); stringTokens.insert(pair("channelid", "")); + intTokens.insert(pair("channellogoexists", 0)); intTokens.insert(pair("channelnumber", 0)); } -- cgit v1.2.3