1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed setting up the 'Recordings' menu in case there are several recordings with exactly the same name

This commit is contained in:
Klaus Schmidinger 2011-02-26 15:35:30 +01:00
parent 750d98f1e6
commit 387ee5b604
2 changed files with 4 additions and 2 deletions

View File

@ -6539,3 +6539,5 @@ Video Disk Recorder Revision History
input from Oliver Endriss).
- Fixed reallocating memory in cTsToPes::PutTs() (suggested by Oliver Endriss).
- Now checking the result of all realloc() calls.
- Fixed setting up the 'Recordings' menu in case there are several recordings
with exactly the same name.

4
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 2.26 2011/02/25 14:24:32 kls Exp $
* $Id: menu.c 2.27 2011/02/26 15:28:32 kls Exp $
*/
#include "menu.h"
@ -2276,7 +2276,7 @@ void cMenuRecordings::Set(bool Refresh)
for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording)) {
if (!base || (strstr(recording->Name(), base) == recording->Name() && recording->Name()[strlen(base)] == FOLDERDELIMCHAR)) {
cMenuRecordingItem *Item = new cMenuRecordingItem(recording, level);
if (*Item->Text() && (!LastItem || strcmp(Item->Text(), LastItemText) != 0)) {
if (*Item->Text() && (!Item->IsDirectory() || (!LastItem || !LastItem->IsDirectory() || strcmp(Item->Text(), LastItemText) != 0))) {
Add(Item);
LastItem = Item;
free(LastItemText);