mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Implemented option '--vfat'; replaced ':' with '.' in recording names
This commit is contained in:
parent
a964a8d732
commit
06117cbaab
@ -910,6 +910,7 @@ Hermann Gausterer <mrq1@gmx.net>
|
|||||||
|
|
||||||
Peter Bieringer <pb@bieringer.de>
|
Peter Bieringer <pb@bieringer.de>
|
||||||
for reporting a problem with duplicate recordings with the same file name
|
for reporting a problem with duplicate recordings with the same file name
|
||||||
|
for suggesting to implement the command line option '--vfat'
|
||||||
|
|
||||||
Alexander Damhuis <ad@phonedation.de>
|
Alexander Damhuis <ad@phonedation.de>
|
||||||
for reporting problems when deleting a timer that is currently recording
|
for reporting problems when deleting a timer that is currently recording
|
||||||
|
6
HISTORY
6
HISTORY
@ -3783,3 +3783,9 @@ Video Disk Recorder Revision History
|
|||||||
the static function cRemote::CallPlugin().
|
the static function cRemote::CallPlugin().
|
||||||
- The SVDRP command PLUG now has a new option 'main' which can be used to initiate
|
- The SVDRP command PLUG now has a new option 'main' which can be used to initiate
|
||||||
a call to the main menu function of a plugin (using part of a patch by Hardy Flor).
|
a call to the main menu function of a plugin (using part of a patch by Hardy Flor).
|
||||||
|
- The new command line option '--vfat' can be used to make VDR encode special
|
||||||
|
characters in recording file names, even if it wasn't compiled with VFAT=1
|
||||||
|
(suggested by Peter Bieringer). The compile time option VFAT still exists and
|
||||||
|
creates a VDR that always behaves as if it were called with '--vfat'.
|
||||||
|
- Replaced the ':' delimiter between hour and minute in recording file names with
|
||||||
|
a '.' under Linux, too. Existing recordings with ':' as delimiter will still work.
|
||||||
|
3
INSTALL
3
INSTALL
@ -71,7 +71,8 @@ time switch
|
|||||||
|
|
||||||
VFAT=1
|
VFAT=1
|
||||||
|
|
||||||
to the 'make' command.
|
to the 'make' command. Alternatively, you can call VDR with the command
|
||||||
|
line option '--vfat'.
|
||||||
|
|
||||||
When running, the 'vdr' program writes status information into the
|
When running, the 'vdr' program writes status information into the
|
||||||
system log file (/var/log/messages). You may want to watch these
|
system log file (/var/log/messages). You may want to watch these
|
||||||
|
20
recording.c
20
recording.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: recording.c 1.111 2005/08/13 14:00:48 kls Exp $
|
* $Id: recording.c 1.112 2005/09/03 13:16:57 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "recording.h"
|
#include "recording.h"
|
||||||
@ -36,15 +36,8 @@
|
|||||||
#define DATAFORMAT "%4d-%02d-%02d.%02d:%02d.%02d.%02d" RECEXT
|
#define DATAFORMAT "%4d-%02d-%02d.%02d:%02d.%02d.%02d" RECEXT
|
||||||
#define NAMEFORMAT "%s/%s/" DATAFORMAT
|
#define NAMEFORMAT "%s/%s/" DATAFORMAT
|
||||||
*/
|
*/
|
||||||
// start of implementation for brain dead systems
|
|
||||||
#define DATAFORMAT "%4d-%02d-%02d.%02d%*c%02d.%02d.%02d" RECEXT
|
#define DATAFORMAT "%4d-%02d-%02d.%02d%*c%02d.%02d.%02d" RECEXT
|
||||||
#ifdef VFAT
|
#define NAMEFORMAT "%s/%s/" "%4d-%02d-%02d.%02d.%02d.%02d.%02d" RECEXT
|
||||||
#define nameFORMAT "%4d-%02d-%02d.%02d.%02d.%02d.%02d" RECEXT
|
|
||||||
#else
|
|
||||||
#define nameFORMAT "%4d-%02d-%02d.%02d:%02d.%02d.%02d" RECEXT
|
|
||||||
#endif
|
|
||||||
#define NAMEFORMAT "%s/%s/" nameFORMAT
|
|
||||||
// end of implementation for brain dead systems
|
|
||||||
|
|
||||||
#define RESUMEFILESUFFIX "/resume%s%s.vdr"
|
#define RESUMEFILESUFFIX "/resume%s%s.vdr"
|
||||||
#ifdef SUMMARYFALLBACK
|
#ifdef SUMMARYFALLBACK
|
||||||
@ -65,6 +58,8 @@
|
|||||||
|
|
||||||
#define MAX_SUBTITLE_LENGTH 40
|
#define MAX_SUBTITLE_LENGTH 40
|
||||||
|
|
||||||
|
bool VfatFileSystem = false;
|
||||||
|
|
||||||
void RemoveDeletedRecordings(void)
|
void RemoveDeletedRecordings(void)
|
||||||
{
|
{
|
||||||
static time_t LastRemoveCheck = 0;
|
static time_t LastRemoveCheck = 0;
|
||||||
@ -297,7 +292,7 @@ static char *ExchangeChars(char *s, bool ToFileSystem)
|
|||||||
{
|
{
|
||||||
char *p = s;
|
char *p = s;
|
||||||
while (*p) {
|
while (*p) {
|
||||||
#ifdef VFAT
|
if (VfatFileSystem) {
|
||||||
// The VFAT file system can't handle all characters, so we
|
// The VFAT file system can't handle all characters, so we
|
||||||
// have to take extra efforts to encode/decode them:
|
// have to take extra efforts to encode/decode them:
|
||||||
if (ToFileSystem) {
|
if (ToFileSystem) {
|
||||||
@ -362,14 +357,15 @@ static char *ExchangeChars(char *s, bool ToFileSystem)
|
|||||||
case '\x03': *p = ':'; break;
|
case '\x03': *p = ':'; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
}
|
||||||
|
else {
|
||||||
for (struct tCharExchange *ce = CharExchange; ce->a && ce->b; ce++) {
|
for (struct tCharExchange *ce = CharExchange; ce->a && ce->b; ce++) {
|
||||||
if (*p == (ToFileSystem ? ce->a : ce->b)) {
|
if (*p == (ToFileSystem ? ce->a : ce->b)) {
|
||||||
*p = ToFileSystem ? ce->b : ce->a;
|
*p = ToFileSystem ? ce->b : ce->a;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
}
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: recording.h 1.39 2005/08/13 14:09:50 kls Exp $
|
* $Id: recording.h 1.40 2005/09/03 13:04:41 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __RECORDING_H
|
#ifndef __RECORDING_H
|
||||||
@ -18,6 +18,8 @@
|
|||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
|
|
||||||
|
extern bool VfatFileSystem;
|
||||||
|
|
||||||
void RemoveDeletedRecordings(void);
|
void RemoveDeletedRecordings(void);
|
||||||
void AssertFreeDiskSpace(int Priority = 0);
|
void AssertFreeDiskSpace(int Priority = 0);
|
||||||
///< The special Priority value -1 means that we shall get rid of any
|
///< The special Priority value -1 means that we shall get rid of any
|
||||||
|
11
vdr.c
11
vdr.c
@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
* The project's page is at http://www.cadsoft.de/vdr
|
* The project's page is at http://www.cadsoft.de/vdr
|
||||||
*
|
*
|
||||||
* $Id: vdr.c 1.214 2005/09/03 12:35:29 kls Exp $
|
* $Id: vdr.c 1.215 2005/09/03 13:21:32 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -131,6 +131,9 @@ int main(int argc, char *argv[])
|
|||||||
#elif defined(REMOTE_RCU)
|
#elif defined(REMOTE_RCU)
|
||||||
RcuDevice = RCU_DEVICE;
|
RcuDevice = RCU_DEVICE;
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(VFAT)
|
||||||
|
VfatFileSystem = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
cPluginManager PluginManager(DEFAULTPLUGINDIR);
|
cPluginManager PluginManager(DEFAULTPLUGINDIR);
|
||||||
int ExitCode = 0;
|
int ExitCode = 0;
|
||||||
@ -154,6 +157,7 @@ int main(int argc, char *argv[])
|
|||||||
{ "shutdown", required_argument, NULL, 's' },
|
{ "shutdown", required_argument, NULL, 's' },
|
||||||
{ "terminal", required_argument, NULL, 't' },
|
{ "terminal", required_argument, NULL, 't' },
|
||||||
{ "version", no_argument, NULL, 'V' },
|
{ "version", no_argument, NULL, 'V' },
|
||||||
|
{ "vfat", no_argument, NULL, 'v' | 0x100 },
|
||||||
{ "video", required_argument, NULL, 'v' },
|
{ "video", required_argument, NULL, 'v' },
|
||||||
{ "watchdog", required_argument, NULL, 'w' },
|
{ "watchdog", required_argument, NULL, 'w' },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
@ -246,6 +250,9 @@ int main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
case 'V': DisplayVersion = true;
|
case 'V': DisplayVersion = true;
|
||||||
break;
|
break;
|
||||||
|
case 'v' | 0x100:
|
||||||
|
VfatFileSystem = true;
|
||||||
|
break;
|
||||||
case 'v': VideoDirectory = optarg;
|
case 'v': VideoDirectory = optarg;
|
||||||
while (optarg && *optarg && optarg[strlen(optarg) - 1] == '/')
|
while (optarg && *optarg && optarg[strlen(optarg) - 1] == '/')
|
||||||
optarg[strlen(optarg) - 1] = 0;
|
optarg[strlen(optarg) - 1] = 0;
|
||||||
@ -304,6 +311,8 @@ int main(int argc, char *argv[])
|
|||||||
" -t TTY, --terminal=TTY controlling tty\n"
|
" -t TTY, --terminal=TTY controlling tty\n"
|
||||||
" -v DIR, --video=DIR use DIR as video directory (default: %s)\n"
|
" -v DIR, --video=DIR use DIR as video directory (default: %s)\n"
|
||||||
" -V, --version print version information and exit\n"
|
" -V, --version print version information and exit\n"
|
||||||
|
" --vfat encode special characters in recording names to\n"
|
||||||
|
" avoid problems with VFAT file systems\n"
|
||||||
" -w SEC, --watchdog=SEC activate the watchdog timer with a timeout of SEC\n"
|
" -w SEC, --watchdog=SEC activate the watchdog timer with a timeout of SEC\n"
|
||||||
" seconds (default: %d); '0' disables the watchdog\n"
|
" seconds (default: %d); '0' disables the watchdog\n"
|
||||||
"\n",
|
"\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user