diff --git a/HISTORY b/HISTORY index 4b14c20..e964c7a 100644 --- a/HISTORY +++ b/HISTORY @@ -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 diff --git a/skinskeleton/xmlfiles/displaychannel.xml b/skinskeleton/xmlfiles/displaychannel.xml index a95fa66..72a058e 100644 --- a/skinskeleton/xmlfiles/displaychannel.xml +++ b/skinskeleton/xmlfiles/displaychannel.xml @@ -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 --> diff --git a/skinskeleton/xmlfiles/displaymenuchannels.xml b/skinskeleton/xmlfiles/displaymenuchannels.xml index 048d86c..ba6ef24 100644 --- a/skinskeleton/xmlfiles/displaymenuchannels.xml +++ b/skinskeleton/xmlfiles/displaymenuchannels.xml @@ -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 diff --git a/skinskeleton/xmlfiles/displaymenudetailepg.xml b/skinskeleton/xmlfiles/displaymenudetailepg.xml index 12ee9a4..334f52d 100644 --- a/skinskeleton/xmlfiles/displaymenudetailepg.xml +++ b/skinskeleton/xmlfiles/displaymenudetailepg.xml @@ -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 diff --git a/skinskeleton/xmlfiles/displaymenumain.xml b/skinskeleton/xmlfiles/displaymenumain.xml index 23a5e2d..0ad253d 100644 --- a/skinskeleton/xmlfiles/displaymenumain.xml +++ b/skinskeleton/xmlfiles/displaymenumain.xml @@ -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 --> diff --git a/skinskeleton/xmlfiles/displaymenutimers.xml b/skinskeleton/xmlfiles/displaymenutimers.xml index 584ec73..e806240 100644 --- a/skinskeleton/xmlfiles/displaymenutimers.xml +++ b/skinskeleton/xmlfiles/displaymenutimers.xml @@ -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 diff --git a/views/displaymenudetailview.c b/views/displaymenudetailview.c index c24fc6b..cec9749 100644 --- a/views/displaymenudetailview.c +++ b/views/displaymenudetailview.c @@ -127,7 +127,9 @@ void cDisplayMenuDetailView::SetTokens(void) { intTokens.insert(pair("daynumeric", sStartTime->tm_mday)); intTokens.insert(pair("month", sStartTime->tm_mon+1)); - stringTokens.insert(pair("channelid", *(event->ChannelID().ToString()))); + string channelID = *(event->ChannelID().ToString()); + stringTokens.insert(pair("channelid", channelID)); + intTokens.insert(pair("channellogoexists", imgCache->LogoExists(channelID))); bool isRunning = false; time_t now = time(NULL); @@ -658,7 +660,9 @@ void cDisplayMenuDetailView::DrawHeader(void) { headerStringTokens.insert(pair("channelname", "")); headerIntTokens.insert(pair("channelnumber", 0)); } - headerStringTokens.insert(pair("channelid", *(event->ChannelID().ToString()))); + string channelID = *(channel->GetChannelID().ToString()); + headerStringTokens.insert(pair("channelid", channelID)); + headerIntTokens.insert(pair("channellogoexists", imgCache->LogoExists(channelID))); bool isRunning = false; time_t now = time(NULL); 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)); } diff --git a/views/displaymenuitemview.c b/views/displaymenuitemview.c index 360dcd9..12eeddc 100644 --- a/views/displaymenuitemview.c +++ b/views/displaymenuitemview.c @@ -416,7 +416,9 @@ void cDisplayMenuItemChannelsView::SetTokens(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()); @@ -560,11 +562,14 @@ void cDisplayMenuItemTimersView::SetTokens(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)); } diff --git a/views/viewhelpers.c b/views/viewhelpers.c index 38a332d..0bcc738 100644 --- a/views/viewhelpers.c +++ b/views/viewhelpers.c @@ -133,12 +133,15 @@ bool cViewHelpers::SetDevices(bool initial, map *intTokens, vectorNumber(); 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")); }