Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Sorting of recordings
On Sat, 6 Mar 2004 00:46:50 +0100, Matthias Fechner
<matthiasfechner@web.de> wrote:
> some times ago vdr sort the recordings in the kind, that at first all
> recordings with a '%' will be displayed first. Now it will sort all
> recordings alphabetical but it will ignore the %.
>
> How can i set it, that the % will be sorted to the end of the list?
Replace the function operator< in recording.c with:
bool cRecording::operator< (const cListObject &ListObject)
{
cRecording *r = (cRecording *)&ListObject;
char *s1 = SortName();
char *s2 = r->SortName();
if (s1[0] != '%' && s2[0] != '%')
return(strcasecmp(s1, s2) < 0);
if (s1[0] == '%' && s2[0] != '%')
return 0;
if (s1[0] != '%' && s2[0] == '%')
return 1;
return(strcasecmp(&s1[1], &s2[1]) < 0);
}
I do this replacement in every new version.
Emil
--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
Home |
Main Index |
Thread Index