[bug,vdr-1.3.33] invalid LastReplayed() opens first folder
Commit Message
Udo Richter wrote:
> Hi Klaus,
>
> I've found a minor bug in the new cMenuRecordings.
>
> If the recordings menu is opened with OpenSubMenus=true and with
> cReplayControl::LastReplayed() pointing to a non-existing recording, VDR
> descends into the first recording sub menu, provide that the first
> recording menu item is a sub-menu, not a recording.
> ...
The attached patch should fix this.
It also avoids an unjustified "Error while accessing recording!" after
deleting a recording from a subfolder.
Klaus
@@ -1513,6 +1513,7 @@
SetCurrent(First());
else if (OpenSubMenus && cReplayControl::LastReplayed() && Open(true))
return;
+ Display();
SetHelpKeys();
}
@@ -1556,7 +1557,7 @@
if (Refresh) {
cMenuRecordingItem *ri = (cMenuRecordingItem *)Get(Current());
if (ri) {
- cRecording *Recording = GetRecording(ri);
+ cRecording *Recording = Recordings.GetByName(ri->FileName());
if (Recording)
CurrentRecording = Recording->FileName();
}
@@ -1583,7 +1584,8 @@
}
}
free(LastItemText);
- Display();
+ if (Refresh)
+ Display();
}
cRecording *cMenuRecordings::GetRecording(cMenuRecordingItem *Item)