added {numtimers} Token to lastrecordings viewelement

This commit is contained in:
louis 2015-05-10 13:49:18 +02:00
parent 896ff99113
commit 5dbe3d8eb3
3 changed files with 6 additions and 2 deletions

View File

@ -21,6 +21,7 @@
</timers>
<!-- Available Variables lastrecordings: 5 newest recordings
{numtimers} number of active timers
{recordings[]} array with 5 newest recordings
{recordings[name]} name of recording
{recordings[seriesname]} series name if available

View File

@ -322,7 +322,6 @@ cDisplayMenuItemSchedulesView::cDisplayMenuItemSchedulesView(cTemplateViewList *
eMenuCategory cat, bool isEpgSearchFav, bool current, bool selectable)
: cDisplayMenuItemView(tmplList, current, selectable) {
this->event = event;
esyslog("skindesigner: constructor cDisplayMenuItemSchedulesView event %s", event->Title());
this->channel = channel;
this->timerMatch = timerMatch;
this->cat = cat;
@ -355,7 +354,6 @@ void cDisplayMenuItemSchedulesView::SetTokens(void) {
}
if (event) {
esyslog("skindesigner: setting Tokens for event %s", event->Title());
if (selectable) {
stringTokens.insert(pair<string,string>("title", event->Title() ? event->Title() : ""));
stringTokens.insert(pair<string,string>("shorttext", event->ShortText() ? event->ShortText() : ""));

View File

@ -760,6 +760,11 @@ void cViewHelpers::SetTimers(map<string,int> *intTokens, map<string,string> *str
void cViewHelpers::SetLastRecordings(map<string,int> *intTokens, map<string,string> *stringTokens, vector<stringmap> *lastRecordings) {
cGlobalSortedTimers SortedTimers;// local and remote timers
int numTimers = SortedTimers.Size();
//set number of timers so that it is possible to adapt this viewelement accordingly
intTokens->insert(pair<string, int>("numtimers", numTimers));
list<cRecording*> orderedRecs;
for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording)) {