From c864c25c244c2ef403aa3952a2bd3864bed97710 Mon Sep 17 00:00:00 2001 From: Andreas Mair Date: Mon, 21 Oct 2013 15:21:39 +0200 Subject: Display folders on top of recordings list when using descending sorting. --- tools.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools.c') diff --git a/tools.c b/tools.c index d0614ba..f7bea68 100644 --- a/tools.c +++ b/tools.c @@ -229,7 +229,7 @@ char *myRecListItem::StripEpisodeName(char *s) // is replaced by the character '1'. All other slashes will be replaced // by '0' in SortName() (see below), which will result in the desired // sequence: - *s1='1'; + *s1=mysetup.DescendSorting ? '0' : '1'; if(!SortByName) { s1++; @@ -245,7 +245,7 @@ char *myRecListItem::SortName(void) const if(!*sb) { char *s=StripEpisodeName(strdup(recording->FileName()+strlen(VideoDirectory))); - strreplace(s,'/','0'); // some locales ignore '/' when sorting + strreplace(s,'/',mysetup.DescendSorting ? '1' : '0'); // some locales ignore '/' when sorting int l=strxfrm(NULL,s,0)+1; *sb=MALLOC(char,l); strxfrm(*sb,s,l); -- cgit v1.2.3