Mailing List archive

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

[vdr] Re: Ghost folder



Hermann Gausterer wrote:
> 
> hi :-)
> 
> > Please check whether there is a recording in the C folder
> > that does not correspond to the structure of the other
> > recordings in that area (it may be one level "too high").
> 
> klaus, i think the problem is in the sorting alg. of vdr
> i have it tracked down to:
> if you have an dir with recordings in subdirs (periodic timer)
> and another one with an single-recording (one shot timer)
> and the name of them diff`s only after a special character
> (in this case the " ' " letter) vdr does not detect a difference
> in the both names and sort ALL recordings not by their
> name but by there date (this is correct because vdr
> "thinks" the two names do not diff)
> 
> this also appears (in my case) with the " ! " letter
> 
> to reproduce this, generate two (or more) dirs with
> subdirs of recordings with alternating ctime and
> then put in an LSTR command and look for the
> output
> 
> example:
> 
> [mrq1@mrqserv2 /video]$ ls -l Ke*
> Ke:
> total 0
> drwxr-xr-x    3 root     root           39 Sep 29 23:32 Da/
> drwxr-xr-x    3 root     root           39 Sep 26 23:32 Di/
> drwxr-xr-x    3 root     root           39 Sep 30 23:32 Ei/
> drwxr-xr-x    3 root     root           39 Oct  1 23:32 Sp1/
> drwxr-xr-x    3 root     root           39 Oct  2 23:32 Sp2/
> 
> Ke!:
> total 0
> drwxr-xr-x    3 root     root           39 Oct  3 00:36 Dem/
> drwxr-xr-x    4 root     root           72 Oct  3 05:47 Det/
> [mrq1@mrqserv2 /video]$ ./svdrpsend.pl LSTR | grep -i Ke
> 250-10 26.09 23:32* Ke~Di
> 250-11 29.09 23:32* Ke~Da
> 250-12 30.09 23:32* Ke~Ei
> 250-13 01.10 15:12  Ke!~Dem
> 250-14 01.10 23:32* Ke~Sp1
> 250-15 02.10 15:17* Ke!~Det
> 250-16 02.10 23:32* Ke~Sp2
> 250-17 03.10 05:47* Ke!~Det
> [mrq1@mrqserv2 /video]$
> 
> in the LSTR the sorting is not correct, as also on the OSD

The problem may be in the strxfrm() function used in cRecording::SortName()
to allow locale specific sorting.

Please repeat your test with the following modification (marked XXX):

char *cRecording::SortName(void)
{
  if (!sortBuffer) {
     char *s = StripEpisodeName(strdup(FileName() + strlen(VideoDirectory) + 1));
     sortBuffer = s; return sortBuffer; //XXX insert this line
     int l = strxfrm(NULL, s, 0);
     sortBuffer = MALLOC(char, l);
     strxfrm(sortBuffer, s, l);
     free(s);
     }
  return sortBuffer;
}

Klaus


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index