diff options
-rw-r--r-- | HISTORY | 4 | ||||
-rw-r--r-- | menu.c | 4 | ||||
-rw-r--r-- | recording.c | 26 |
3 files changed, 22 insertions, 12 deletions
@@ -7870,7 +7870,7 @@ Video Disk Recorder Revision History and also to use the correct directory with --edit (the latter reported by Marko Mäkelä). -2014-01-28: Version 2.0.6 +2014-01-29: Version 2.0.6 - Updated 'sources.conf' (thanks to Antti Hartikainen). - cFont::CreateFont() now returns a dummy font in case there are no fonts installed. @@ -7885,3 +7885,5 @@ Video Disk Recorder Revision History of actual video TS packets in cTsPayload in order to be able to record channels that sometimes need even more than 10 TS packets for detecting frame borders (reported by Eike Sauer and Oliver Endriss). +- Fixed sorting recordings by time in the Recordings menu if "Setup/OSD/Recording + directories" is set to "no". @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 2.82.1.5 2013/10/16 09:46:24 kls Exp $ + * $Id: menu.c 2.82.1.6 2014/01/29 10:48:02 kls Exp $ */ #include "menu.h" @@ -2648,7 +2648,7 @@ eOSState cMenuSetupOSD::ProcessKey(eKeys Key) ModifiedAppearance = true; if (strcmp(data.FontFix, Setup.FontFix) || !DoubleEqual(data.FontFixSizeP, Setup.FontFixSizeP)) ModifiedAppearance = true; - if (data.AlwaysSortFoldersFirst != Setup.AlwaysSortFoldersFirst) + if (data.AlwaysSortFoldersFirst != Setup.AlwaysSortFoldersFirst || data.RecordingDirs != Setup.RecordingDirs) Recordings.ClearSortNames(); } diff --git a/recording.c b/recording.c index c1a00cf9..ef3144e2 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 2.91.1.3 2013/12/25 10:55:32 kls Exp $ + * $Id: recording.c 2.91.1.4 2014/01/29 10:50:28 kls Exp $ */ #include "recording.h" @@ -958,14 +958,22 @@ char *cRecording::SortName(void) const { char **sb = (RecordingsSortMode == rsmName) ? &sortBufferName : &sortBufferTime; if (!*sb) { - char *s = strdup(FileName() + strlen(VideoDirectory)); - if (RecordingsSortMode != rsmName || Setup.AlwaysSortFoldersFirst) - s = StripEpisodeName(s, RecordingsSortMode != rsmName); - strreplace(s, '/', '0'); // some locales ignore '/' when sorting - int l = strxfrm(NULL, s, 0) + 1; - *sb = MALLOC(char, l); - strxfrm(*sb, s, l); - free(s); + if (RecordingsSortMode == rsmTime && !Setup.RecordingDirs) { + char buf[32]; + struct tm tm_r; + strftime(buf, sizeof(buf), "%Y%m%d%H%I", localtime_r(&start, &tm_r)); + *sb = strdup(buf); + } + else { + char *s = strdup(FileName() + strlen(VideoDirectory)); + if (RecordingsSortMode != rsmName || Setup.AlwaysSortFoldersFirst) + s = StripEpisodeName(s, RecordingsSortMode != rsmName); + strreplace(s, '/', '0'); // some locales ignore '/' when sorting + int l = strxfrm(NULL, s, 0) + 1; + *sb = MALLOC(char, l); + strxfrm(*sb, s, l); + free(s); + } } return *sb; } |