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

Fixed handling hierarchical recordings menu in case of directories starting with the same sequence of characters

This commit is contained in:
Klaus Schmidinger 2002-02-01 15:11:39 +01:00
parent 9a64e7a818
commit 103124c82c
2 changed files with 4 additions and 2 deletions

View File

@ -934,3 +934,5 @@ Video Disk Recorder Revision History
2002-02-01: Version 0.99pre5 2002-02-01: Version 0.99pre5
- Updated channel settings for 'N24' (thanks to Andreas Gebel). - Updated channel settings for 'N24' (thanks to Andreas Gebel).
- Fixed handling hierarchical recordings menu in case of directories starting
with the same sequence of characters.

4
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.c 1.146 2002/01/27 15:50:50 kls Exp $ * $Id: menu.c 1.147 2002/02/01 15:08:44 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -1553,7 +1553,7 @@ cMenuRecordings::cMenuRecordings(const char *Base, int Level, bool OpenSubMenus)
cMenuRecordingItem *LastItem = NULL; cMenuRecordingItem *LastItem = NULL;
char *LastItemText = NULL; char *LastItemText = NULL;
for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording)) { for (cRecording *recording = Recordings.First(); recording; recording = Recordings.Next(recording)) {
if (!Base || strstr(recording->Name(), Base) == recording->Name()) { if (!Base || (strstr(recording->Name(), Base) == recording->Name() && recording->Name()[strlen(Base)] == '~')) {
cMenuRecordingItem *Item = new cMenuRecordingItem(recording, level); cMenuRecordingItem *Item = new cMenuRecordingItem(recording, level);
if (*Item->Text() && (!LastItem || strcmp(Item->Text(), LastItemText) != 0)) { if (*Item->Text() && (!LastItem || strcmp(Item->Text(), LastItemText) != 0)) {
Add(Item); Add(Item);