1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed sorting recordings by time in the Recordings menu if "Setup/OSD/Recording directories" is set to "no"

This commit is contained in:
Klaus Schmidinger 2014-01-29 10:45:28 +01:00
parent 9eda923269
commit 6a9502ab17
3 changed files with 22 additions and 12 deletions

View File

@ -8170,7 +8170,7 @@ Video Disk Recorder Revision History
- Fixed a superfluous call to the skin's SetRecording() function after renaming a
recording (reported by Christoph Haubrich).
2014-01-26: Version 2.1.5
2014-01-29: Version 2.1.5
- Now checking whether the primary device actually has a decoder before retuning the
current channel after a change in its parameters. This fixes broken recordings on
@ -8179,3 +8179,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
Oliver Endriss).
- Fixed sorting recordings by time in the Recordings menu if "Setup/OSD/Recording
directories" is set to "no".

4
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 3.16 2014/01/25 12:40:28 kls Exp $
* $Id: menu.c 3.17 2014/01/29 10:41:10 kls Exp $
*/
#include "menu.h"
@ -3024,7 +3024,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();
}

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.c 3.13 2014/01/18 12:54:56 kls Exp $
* $Id: recording.c 3.14 2014/01/29 10:38:46 kls Exp $
*/
#include "recording.h"
@ -969,6 +969,13 @@ char *cRecording::SortName(void) const
{
char **sb = (RecordingsSortMode == rsmName) ? &sortBufferName : &sortBufferTime;
if (!*sb) {
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(cVideoDirectory::Name()));
if (RecordingsSortMode != rsmName || Setup.AlwaysSortFoldersFirst)
s = StripEpisodeName(s, RecordingsSortMode != rsmName);
@ -978,6 +985,7 @@ char *cRecording::SortName(void) const
strxfrm(*sb, s, l);
free(s);
}
}
return *sb;
}