mirror of
				https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
				synced 2023-10-19 15:58:31 +00:00 
			
		
		
		
	added {numtimers} Token to lastrecordings viewelement
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -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() : "")); | ||||
|   | ||||
| @@ -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)) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user