From: Damian Gołda Date: Thu, 8 Jan 2015 21:08:43 +0000 (+0100) Subject: Issue 1625 - Option for Windows-compatible filenames X-Git-Tag: v4.1~509 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=022e8d45a530e82366f05bdbf6569a375eb1650f;p=thirdparty%2Ftvheadend.git Issue 1625 - Option for Windows-compatible filenames --- diff --git a/docs/html/config_dvr.html b/docs/html/config_dvr.html index f0bfea9f9..82920b242 100644 --- a/docs/html/config_dvr.html +++ b/docs/html/config_dvr.html @@ -176,10 +176,17 @@
If checked, insert the episode number before the data and time rather than after (assumes Include date, Include time and Include episode options are set).
Remove all unsafe characters from filename -
If checked, all characters that could possibly cause problems for filenaming will be removed. +
If checked, all characters that could possibly cause problems for filenaming will be replaced with '_'.
+ Applies to characters:
+ * not supported by Windows characters: / : \ < > | * ? ' "
+ * control characters (ASCII code below 32)
+ * control and national characters (ASCII code above 122)
Replace whitespace in title with '-' -
If checked, all whitespace characters will be replaced with '-'. +
If checked, whitespace characters (spaces and tabs) will be replaced with '-'. + +
Use Windows-compatible filenames +
If checked, special characters not supported by Windows like: / : \ < > | * ? ' " will be replaced with '_'. Changes to any of these settings must be confirmed by pressing the 'Save configuration' button before taking effect. diff --git a/src/dvr/dvr.h b/src/dvr/dvr.h index 346d452dd..eb5fb0d8f 100644 --- a/src/dvr/dvr.h +++ b/src/dvr/dvr.h @@ -64,7 +64,7 @@ typedef struct dvr_config { int dvr_subtitle_in_title; int dvr_episode_before_date; int dvr_episode_duplicate; - int dvr_clean_samba_unsafe; + int dvr_windows_compatible_filenames; /* Series link support */ int dvr_sl_brand_lock; diff --git a/src/dvr/dvr_config.c b/src/dvr/dvr_config.c index eb5199c1f..26e56b42d 100644 --- a/src/dvr/dvr_config.c +++ b/src/dvr/dvr_config.c @@ -729,9 +729,9 @@ const idclass_t dvr_config_class = { }, { .type = PT_BOOL, - .id = "clean-samba-unsafe", - .name = "Replace Samba Unsafe Characters with '_'", - .off = offsetof(dvr_config_t, dvr_clean_samba_unsafe), + .id = "windows-compatible-filenames", + .name = "Use Windows-compatible filenames", + .off = offsetof(dvr_config_t, dvr_windows_compatible_filenames), .group = 5, }, {} diff --git a/src/dvr/dvr_rec.c b/src/dvr/dvr_rec.c index d028e77d9..f669abee0 100644 --- a/src/dvr/dvr_rec.c +++ b/src/dvr/dvr_rec.c @@ -164,7 +164,7 @@ cleanup_filename(char *s, dvr_config_t *cfg) ((s[i] < 32) || (s[i] > 122) || (strchr("/:\\<>|*?'\"", s[i]) != NULL))) s[i] = '_'; - else if(cfg->dvr_clean_samba_unsafe && + else if(cfg->dvr_windows_compatible_filenames && (strchr("/:\\<>|*?'\"", s[i]) != NULL)) s[i] = '_'; }