summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2014-11-01 10:23:34 +0100
committerlouis <louis.braun@gmx.de>2014-11-01 10:23:34 +0100
commit13817c785fcf2589f857b169fd9af9e428dc64b5 (patch)
tree06abb410a4c356b13713ee9a674a320a342750d5
parent3d702a9ad5f04179d78659f48579f3466abbe69a (diff)
downloadvdr-plugin-skindesigner-13817c785fcf2589f857b169fd9af9e428dc64b5.tar.gz
vdr-plugin-skindesigner-13817c785fcf2589f857b169fd9af9e428dc64b5.tar.bz2
added {channelname}, {channelid}, {channellogoexists} for all schedules list and current views
-rw-r--r--HISTORY1
-rw-r--r--displaymenu.c15
-rw-r--r--skins/metrixhd/xmlfiles/displaymenuschedules.xml7
-rw-r--r--skinskeleton/xmlfiles/displaymenuschedules.xml7
-rw-r--r--views/displaymenuitemcurrentview.c5
-rw-r--r--views/displaymenuitemview.c5
-rw-r--r--views/displaymenurootview.h1
-rw-r--r--views/displaymenuview.c5
-rw-r--r--views/displaymenuview.h2
9 files changed, 33 insertions, 15 deletions
diff --git a/HISTORY b/HISTORY
index 35945a8..81551b4 100644
--- a/HISTORY
+++ b/HISTORY
@@ -47,5 +47,6 @@ Version 0.0.3
- changed skin metrixHD to display bitrate infos
- added "active" Token for cutting marks so that a mark can be displayed in a dedicated way if current position
in replay exactly hits the mark
+- added {channelname}, {channelid}, {channellogoexists} for all schedules list and current views
diff --git a/displaymenu.c b/displaymenu.c
index 9f0e97e..d9ec692 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -81,17 +81,18 @@ bool cSDDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current,
return false;
if (config.blockFlush)
rootView->LockFlush();
- if (Current) {
- if (Channel) {
- rootView->SetChannel(Channel);
- } else if (Event) {
- rootView->SetChannel(Channels.GetByChannelID(Event->ChannelID()));
- }
+ const cChannel *channel = Channel;
+ if (!channel) {
+ channel = rootView->GetChannel();
+ }
+ if (!channel && Event) {
+ channel = Channels.GetByChannelID(Event->ChannelID());
+ rootView->SetChannel(channel);
}
cDisplayMenuListView *list = rootView->GetListView();
if (!list)
return false;
- list->AddSchedulesMenuItem(Index, Event, Channel, TimerMatch, MenuCategory(), Current, Selectable);
+ list->AddSchedulesMenuItem(Index, Event, channel, TimerMatch, MenuCategory(), Current, Selectable);
if (state == vsIdle)
state = vsMenuUpdate;
return true;
diff --git a/skins/metrixhd/xmlfiles/displaymenuschedules.xml b/skins/metrixhd/xmlfiles/displaymenuschedules.xml
index b28471e..42169eb 100644
--- a/skins/metrixhd/xmlfiles/displaymenuschedules.xml
+++ b/skins/metrixhd/xmlfiles/displaymenuschedules.xml
@@ -40,8 +40,9 @@
{durationminutes} duration, rest of minutes
{current} true if item is currently selected
{separator} true if item is a list separator
- {channelname} Channel Name (for what's on now and next)
- {channelid} ChannelID as path to display channel logo (for what's on now and next)
+ {channelname} Channel Name
+ {channelid} ChannelID as path to display channel logo
+ {channellogoexists} true if a channel logo exists
{whatson} true if menu "What's on" is displayed
{whatsonnow} true if menu "What's on now" is displayed
{whatsonnext} true if menu "What's on next" is displayed
@@ -124,7 +125,9 @@
{duration} duration of event
{durationhours} duration, full hours
{durationminutes} duration, rest of minutes
+ {channelname} Channel Name
{channelid} ChannelID as path to display channel logo
+ {channellogoexists} true if a channel logo exists
{hasposter} true if a scraped poster is available for this element
{posterwidth} width of scraped poster
{posterheight} height of scraped poster
diff --git a/skinskeleton/xmlfiles/displaymenuschedules.xml b/skinskeleton/xmlfiles/displaymenuschedules.xml
index 5864fcf..4b6b20d 100644
--- a/skinskeleton/xmlfiles/displaymenuschedules.xml
+++ b/skinskeleton/xmlfiles/displaymenuschedules.xml
@@ -34,8 +34,9 @@
{durationminutes} duration, rest of minutes
{current} true if item is currently selected
{separator} true if item is a list separator
- {channelname} Channel Name (for what's on now and next)
- {channelid} ChannelID as path to display channel logo (for what's on now and next)
+ {channelname} Channel Name
+ {channelid} ChannelID as path to display channel logo
+ {channellogoexists} true if a channel logo exists
{whatson} true if menu "What's on" is displayed
{whatsonnow} true if menu "What's on now" is displayed
{whatsonnext} true if menu "What's on next" is displayed
@@ -65,7 +66,9 @@
{duration} duration of event
{durationhours} duration, full hours
{durationminutes} duration, rest of minutes
+ {channelname} Channel Name
{channelid} ChannelID as path to display channel logo
+ {channellogoexists} true if a channel logo exists
{hasposter} true if a scraped poster is available for this element
{posterwidth} width of scraped poster
{posterheight} height of scraped poster
diff --git a/views/displaymenuitemcurrentview.c b/views/displaymenuitemcurrentview.c
index 312b041..ce9fb22 100644
--- a/views/displaymenuitemcurrentview.c
+++ b/views/displaymenuitemcurrentview.c
@@ -165,7 +165,10 @@ void cDisplayMenuItemCurrentSchedulesView::Render(void) {
SetScraperPoster(event);
}
if (channel) {
- stringTokens.insert(pair<string,string>("channelid", *(channel->GetChannelID().ToString())));
+ stringTokens.insert(pair<string,string>("channelname", channel->Name() ? channel->Name() : ""));
+ string channelID = *(channel->GetChannelID().ToString());
+ stringTokens.insert(pair<string,string>("channelid", channelID));
+ intTokens.insert(pair<string, int>("channellogoexists", imgCache->LogoExists(channelID)));
}
vector< map<string,string> > schedulesTokens;
diff --git a/views/displaymenuitemview.c b/views/displaymenuitemview.c
index 5e995c5..67fd641 100644
--- a/views/displaymenuitemview.c
+++ b/views/displaymenuitemview.c
@@ -333,13 +333,16 @@ void cDisplayMenuItemSchedulesView::SetTokens(void) {
}
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)));
if (!event && !selectable) {
stringTokens.insert(pair<string,string>("title", channel->Name() ? ParseSeparator(channel->Name()) : ""));
}
} else {
stringTokens.insert(pair<string,string>("channelname", ""));
stringTokens.insert(pair<string,string>("channelid", ""));
+ intTokens.insert(pair<string, int>("channellogoexists", 0));
}
}
diff --git a/views/displaymenurootview.h b/views/displaymenurootview.h
index 0852570..5b491e5 100644
--- a/views/displaymenurootview.h
+++ b/views/displaymenurootview.h
@@ -36,6 +36,7 @@ public:
void SetMenu(eMenuCategory menuCat, bool menuInit);
void SetTitle(const char *title);
void SetChannel(const cChannel *channel) { view->SetChannel(channel); };
+ const cChannel *GetChannel(void) { return view->GetChannel(); };
void SetButtonTexts(const char *Red, const char *Green, const char *Yellow, const char *Blue);
void SetTabs(int tab1, int tab2, int tab3, int tab4, int tab5);
void SetMessage(eMessageType type, const char *text);
diff --git a/views/displaymenuview.c b/views/displaymenuview.c
index f5a841c..5a54628 100644
--- a/views/displaymenuview.c
+++ b/views/displaymenuview.c
@@ -432,8 +432,9 @@ bool cDisplayMenuSchedulesView::DrawHeader(void) {
if (channel) {
stringTokens.insert(pair<string,string>("channelnumber", *cString::sprintf("%d", channel->Number())));
stringTokens.insert(pair<string,string>("channelname", 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)));
}
bool hasIcon = false;
string icon = imgCache->GetIconName(menuTitle, cat);
diff --git a/views/displaymenuview.h b/views/displaymenuview.h
index 34fed44..3247c76 100644
--- a/views/displaymenuview.h
+++ b/views/displaymenuview.h
@@ -17,6 +17,7 @@ public:
void SetMenuCat(eMenuCategory newCat) { cat = newCat; };
void SetTitle(const char *title) {menuTitle = title; };
virtual void SetChannel(const cChannel *channel) {};
+ virtual const cChannel *GetChannel(void) { return NULL; };
void SetButtonTexts(string *buttonTexts) { this->buttonTexts = buttonTexts; };
bool DrawBackground(void);
virtual bool DrawHeader(void);
@@ -51,6 +52,7 @@ public:
cDisplayMenuSchedulesView(cTemplateView *tmplView, eMenuCategory menuCat, bool menuInit);
virtual ~cDisplayMenuSchedulesView();
void SetChannel(const cChannel *channel) { this->channel = channel; };
+ const cChannel *GetChannel(void) { return channel; };
bool DrawHeader(void);
};