]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Issue 1625 - Option for Windows-compatible filenames
authorDamian Gołda <Damian.Golda@gmail.com>
Thu, 8 Jan 2015 21:08:43 +0000 (22:08 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 8 Jan 2015 21:22:03 +0000 (22:22 +0100)
docs/html/config_dvr.html
src/dvr/dvr.h
src/dvr/dvr_config.c
src/dvr/dvr_rec.c

index f0bfea9f98d91eed770396ee08f3cf1ff786de1c..82920b2429ab45d1a29cbc992b1ef96f1d1425dd 100644 (file)
   <dd>If checked, insert the episode number before the data and time rather than after (assumes <i>Include date</i>, <i>Include time</i> and <i>Include episode</i> options are set).
          
   <dt>Remove all unsafe characters from filename
-  <dd>If checked, all characters that could possibly cause problems for filenaming will be removed.
+  <dd>If checked, all characters that could possibly cause problems for filenaming will be replaced with '_'.<br>
+         Applies to characters:<br>
+      * not supported by Windows characters: <i>/ : \ < > | * ? ' "</i><br>
+      * control characters (ASCII code below 32)<br>
+      * control and national characters (ASCII code above 122)<br> 
   
   <dt>Replace whitespace in title with '-'
-  <dd>If checked, all whitespace characters will be replaced with '-'.
+  <dd>If checked, whitespace characters (spaces and tabs) will be replaced with '-'.
+  
+  <dt>Use Windows-compatible filenames
+  <dd>If checked, special characters not supported by Windows like: <i>/ : \ < > | * ? ' "</i> will be replaced with '_'.
   
  </dl>
  Changes to any of these settings must be confirmed by pressing the 'Save configuration' button before taking effect.
index 346d452dd59a111fd3fa728188af4921f3a689f9..eb5fb0d8f71b518b6f556d5f1c1ed807a721bda6 100644 (file)
@@ -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;
index eb5199c1fb9dde257e0d0afcf1e120e368749bae..26e56b42db51217c10006bb9579591e11cde2172 100644 (file)
@@ -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,
     },
     {}
index d028e77d9e4e4846ef1c70d56822659a25f58fed..f669abee01edd1902dd0e04dfd8ad950985d5bde 100644 (file)
@@ -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] = '_';
   }