Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Fix for hierarchical recordings menu



Norbert Schmidt wrote:
> 
> Am Mittwoch, 30. Januar 2002 00:24 schrieben Sie:
> > nschmidt-nrw@t-online.de wrote:
> > > Hi Klaus,
> > >
> > > as usual: great job. I really like the hierarchical structure ;-).
> > >
> > > One problem occurs due to my two Simpsons timers:
> > >
> > > a) 17.55 - 18.40 MDMDF-- Simpsons
> > > b) 21.12 - 22.20 M------ Simpsons - neu
> > >                          (=SimpsonsSPACE-SPACEneu)
> > >
> > > It shows the following result in the recordings menu
> > >
> > > 1 0 Simpsons
> > >     --> 28.12. 18.55  Der Ernstfall
> > >     --> 28.12. 21.12* Trilogie derselben Geschichte (wrong folder !!)
> > > 1 1 Simpsons - neu
> > >     --> 28.12. 21.12* Trilogie derselben Geschichte (correct folder!!)
> > >
> > > Seems to be a problem with the first SPACE in SimpsonsSPACE-SPACE-neu.
> > >
> > > CU Norbert
> >
> > Am I right in assuming that the directories on disk are all ok, but only
> > the display in the "Recordings" menu is wrong?
> 
> Yes, that's right if recording dirs is set to YES. Replaying is still fine
> 
> >
> > Can you send me the result of an
> >
> >   ls -l `find /video -type f`
> >
> > on your machine?
> >
> > Klaus
> 
> Unfortunately my  Simpsons_neu recordings were deleted over
> the last days. But I could reproduce the above mentioned result in
> the menu by adding a second Becker timer (MDMDFSM)
> called "Becker neu" with the following output
> 
> ls: find  /video -type f: Datei oder Verzeichnis nicht gefunden
> 
> Hope this helps.
> 
> Bye Norbert

The problem was that both directories started with the same sequence of
characters ("Simpsons"). Here's a fix for this:

--- menu.c      2002/01/27 15:50:50     1.146
+++ menu.c      2002/02/01 15:08:44
@@ -1553,7 +1553,7 @@
      cMenuRecordingItem *LastItem = NULL;
      char *LastItemText = NULL;
      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);
             if (*Item->Text() && (!LastItem || strcmp(Item->Text(), LastItemText) != 0)) {
                Add(Item);

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________



Home | Main Index | Thread Index