summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2014-11-29 11:55:53 +0100
committerlouis <louis.braun@gmx.de>2014-11-29 11:55:53 +0100
commitaf864fd4492569b19b956b3082e95fa091b18ed8 (patch)
treea57bb4ef0ca57a463e23e050399a444230958163
parent76ab3e4cef2ef37ea8e9f2ababfd4b8c98ceaf54 (diff)
downloadvdr-plugin-skindesigner-af864fd4492569b19b956b3082e95fa091b18ed8.tar.gz
vdr-plugin-skindesigner-af864fd4492569b19b956b3082e95fa091b18ed8.tar.bz2
added {channellogoexists} Token everywhere where {channelid} is available
-rw-r--r--HISTORY1
-rw-r--r--skinskeleton/xmlfiles/displaychannel.xml1
-rw-r--r--skinskeleton/xmlfiles/displaymenuchannels.xml2
-rw-r--r--skinskeleton/xmlfiles/displaymenudetailepg.xml2
-rw-r--r--skinskeleton/xmlfiles/displaymenumain.xml1
-rw-r--r--skinskeleton/xmlfiles/displaymenutimers.xml2
-rw-r--r--views/displaymenudetailview.c8
-rw-r--r--views/displaymenuitemcurrentview.c9
-rw-r--r--views/displaymenuitemview.c9
-rw-r--r--views/viewhelpers.c5
10 files changed, 33 insertions, 7 deletions
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<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);
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<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));
}
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<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));
}
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<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"));
}