mirror of
				https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
				synced 2023-10-19 15:58:31 +00:00 
			
		
		
		
	fixed newest rec in folder
This commit is contained in:
		| @@ -138,7 +138,6 @@ string &trim(string &s) { | |||||||
|     return ltrim(rtrim(s)); |     return ltrim(rtrim(s)); | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| // split: receives a char delimiter; returns a vector of strings | // split: receives a char delimiter; returns a vector of strings | ||||||
| // By default ignores repeated delimiters, unless argument rep == 1. | // By default ignores repeated delimiters, unless argument rep == 1. | ||||||
| vector<string>& splitstring::split(char delim, int rep) { | vector<string>& splitstring::split(char delim, int rep) { | ||||||
|   | |||||||
| @@ -66,16 +66,20 @@ void cRecordingsFolderInfo::Rebuild(void) | |||||||
|   // re-get state with lock held |   // re-get state with lock held | ||||||
|   _recordings.StateChanged(_recState); |   _recordings.StateChanged(_recState); | ||||||
|   cFolderInfoIntern *info; |   cFolderInfoIntern *info; | ||||||
|  |   cString folder; | ||||||
|   for (cRecording *rec = _recordings.First(); rec; rec = _recordings.Next(rec)) { |   for (cRecording *rec = _recordings.First(); rec; rec = _recordings.Next(rec)) { | ||||||
|  | #if APIVERSNUM < 20102 | ||||||
|       //cRecording::Folder() first available since VDR 2.1.2 |       //cRecording::Folder() first available since VDR 2.1.2 | ||||||
|       cString folder(""); |       const char *recName = rec->Name(); | ||||||
|       char *folderName = strdup(rec->Name()); |       if (const char *s = strrchr(recName, FOLDERDELIMCHAR)) | ||||||
|       if (char *s = strrchr(folderName, FOLDERDELIMCHAR)) |         folder = cString(recName, s); | ||||||
|         folder = cString(folderName, s); |       else | ||||||
|  |         folder = ""; | ||||||
|  | #else | ||||||
|  |       folder = rec->Folder(); | ||||||
|  | #endif | ||||||
|       info = _root->Find(*folder, true); |       info = _root->Find(*folder, true); | ||||||
|       //info = _root->Find(*rec->Folder(), true); |  | ||||||
|       info->Add(rec); |       info->Add(rec); | ||||||
|       free(folderName); |  | ||||||
|       } |       } | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -558,7 +558,7 @@ void cDisplayMenuItemCurrentRecordingView::Render(void) { | |||||||
|      |      | ||||||
|     stringTokens.insert(pair<string,string>("shorttext", info->ShortText() ? info->ShortText() : "")); |     stringTokens.insert(pair<string,string>("shorttext", info->ShortText() ? info->ShortText() : "")); | ||||||
|     stringTokens.insert(pair<string,string>("description", info->Description() ? info->Description() : "")); |     stringTokens.insert(pair<string,string>("description", info->Description() ? info->Description() : "")); | ||||||
|  |      | ||||||
|     const cEvent *event = info->GetEvent(); |     const cEvent *event = info->GetEvent(); | ||||||
|     if (!event) return; |     if (!event) return; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user