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