From 182a6df2a93d81c3887c48fc77c62ae49b6cb21b Mon Sep 17 00:00:00 2001 From: louis Date: Sat, 15 Nov 2014 15:21:36 +0100 Subject: [PATCH] added {channelnumber} and {channelname} Tokens in displaymenudetailepg --- HISTORY | 9 +++++++-- skins/metrixhd/xmlfiles/displaymenudetailepg.xml | 2 ++ skinskeleton/xmlfiles/displaymenudetailepg.xml | 2 ++ views/displaymenudetailview.c | 8 ++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index bafd45c..0bf51df 100644 --- a/HISTORY +++ b/HISTORY @@ -67,8 +67,10 @@ Version 0.0.3 - fixed Bug that displaychannel was not shown after closing displaymenu with "backspace" (with active menuorg plugin) - fixed Bug with menuselection Patch -- added tokens {month}, {monthname} and {year} in displaymenutimers listitem and currentitem -- added dedicated tokens for posters and banners in in displaychannel and displayreplay +- added tokens {month}, {monthname} and {year} in displaymenutimers listitem and + currentitem +- added dedicated tokens for posters and banners in in + displaychannel and displayreplay - added Plugin Interface - fixed crash when clearing a message in displaychannel and displayreplay - fixed positioning of scaled video window if borders are configured @@ -78,3 +80,6 @@ Version 0.0.4 - added SVG Support - thanks to Manuel Reimer! Version 0.0.5 + +- added {channelnumber} and {channelname} Tokens in displaymenudetailepg + detailheader diff --git a/skins/metrixhd/xmlfiles/displaymenudetailepg.xml b/skins/metrixhd/xmlfiles/displaymenudetailepg.xml index 0e4eaeb..a66ba86 100644 --- a/skins/metrixhd/xmlfiles/displaymenudetailepg.xml +++ b/skins/metrixhd/xmlfiles/displaymenudetailepg.xml @@ -101,6 +101,8 @@ {durationhours} duration, full hours {durationminutes} duration, rest of minutes {vps} vps description string + {channelname} Channelname of event + {channelnumber} Channelnumber of event {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 diff --git a/skinskeleton/xmlfiles/displaymenudetailepg.xml b/skinskeleton/xmlfiles/displaymenudetailepg.xml index e610a41..12ee9a4 100644 --- a/skinskeleton/xmlfiles/displaymenudetailepg.xml +++ b/skinskeleton/xmlfiles/displaymenudetailepg.xml @@ -15,6 +15,8 @@ {durationhours} duration, full hours {durationminutes} duration, rest of minutes {vps} vps description string + {channelname} Channelname of event + {channelnumber} Channelnumber of event {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 diff --git a/views/displaymenudetailview.c b/views/displaymenudetailview.c index c1fbc9c..2e3bf4c 100644 --- a/views/displaymenudetailview.c +++ b/views/displaymenudetailview.c @@ -856,6 +856,14 @@ void cDisplayMenuDetailView::DrawHeader(void) { headerIntTokens.insert(pair("daynumeric", sStartTime->tm_mday)); headerIntTokens.insert(pair("month", sStartTime->tm_mon+1)); + const cChannel *channel = Channels.GetByChannelID(event->ChannelID()); + if (channel) { + headerStringTokens.insert(pair("channelname", channel->Name() ? channel->Name() : "")); + headerIntTokens.insert(pair("channelnumber", channel->Number())); + } else { + headerStringTokens.insert(pair("channelname", "")); + headerIntTokens.insert(pair("channelnumber", 0)); + } headerStringTokens.insert(pair("channelid", *(event->ChannelID().ToString()))); bool isRunning = false;