summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Mair <amair.sob@googlemail.com>2013-10-21 15:21:39 +0200
committerAndreas Mair <amair.sob@googlemail.com>2013-10-21 15:21:39 +0200
commitc864c25c244c2ef403aa3952a2bd3864bed97710 (patch)
treed6930ae7c27b9f0c19570db4d7a474d495464782
parentb5e557baadfc3f89f61d83ac817d68689f941273 (diff)
downloadvdr-plugin-extrecmenu-c864c25c244c2ef403aa3952a2bd3864bed97710.tar.gz
vdr-plugin-extrecmenu-c864c25c244c2ef403aa3952a2bd3864bed97710.tar.bz2
Display folders on top of recordings list when using descending sorting.
-rw-r--r--tools.c4
1 files changed, 2 insertions, 2 deletions
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);