]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
mdhelp: try to complete dvr config, fixes #3731
authorJaroslav Kysela <perex@perex.cz>
Mon, 18 Apr 2016 13:07:57 +0000 (15:07 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 18 Apr 2016 13:08:08 +0000 (15:08 +0200)
docs/property/pathname.md [new file with mode: 0644]
docs/property/postprocessor.md
docs/property/postremove.md [new file with mode: 0644]
docs/property/preprocessor.md [new file with mode: 0644]
src/dvr/dvr_config.c

diff --git a/docs/property/pathname.md b/docs/property/pathname.md
new file mode 100644 (file)
index 0000000..40ef418
--- /dev/null
@@ -0,0 +1,26 @@
+: The string allow to manually specify the full path generation using
+  the predefined modifiers for strftime (see `man strftime`, except
+  `%n` and `%t`) and Tvheadend specific. Note that you may modify some of
+  this format string setting using the GUI fields below.
+
+Format    | Description                                      | Example
+:--------:|--------------------------------------------------|--------
+`$t$n.$x` | Default format (title, unique number, extension) | Tennis - Wimbledon-1.mkv
+`$s`      | Event subtitle name                              | Sport
+`$t`      | Event title name                                 | Tennis - Wimbledon
+`$e`      | Event episode name                               | S02-E06
+`$c`      | Channel name                                     | SkySport
+`$g`      | Content type                                     | Movie : Science fiction
+`$n`      | Unique number added when the file already exists | -1
+`$x`      | Filename extension (from the active stream muxer | mkv
+`%F`      | ISO 8601 date format                             | 2011-03-19
+`%R`      | The time in 24-hour notation                     | 14:12
+
+The format strings `$t`,`$s`,`%e`,`$c` also have delimiter variants such as 
+`$ t` (space after the dollar character), `$-t`, `$_t`,
+`$.t`, `$,t`, `$;t`. In these cases, the delimiter is applied 
+only when the substituted string is not empty.
+
+For $t and $s format strings, you may also limit the number of output
+characters using $99-t format string where 99 means the limit. As you can
+see, the delimiter can be also applied.
index 12f65a54b37202c030b48d29638d0645d1082e08..9f21c8380d90e92bf596f39bcf48c3e53f5b9c92 100644 (file)
@@ -22,6 +22,7 @@ Format | Description                               | Example value
 `%E`   | Stop time stamp of recording, UNIX epoch  |  1224426600
 `%r`   | Number of errors during recording         |  0
 `%R`   | Number of data errors during recording    |  6
+`%i`   | Streams (comma separated)                 |  H264,AC3,TELETEXT
 
 *Example usage*
 
diff --git a/docs/property/postremove.md b/docs/property/postremove.md
new file mode 100644 (file)
index 0000000..9ff0565
--- /dev/null
@@ -0,0 +1,32 @@
+: Command to run after finishing a recording. The command will be run in
+  background and is executed even if a recording is aborted or an error
+  occurred. Use the %e error formatting string to check for errors, the
+  error string is “OK” if recording finished successfully.
+
+ Supported format strings:
+
+
+Format | Description                               | Example value
+:-----:| ----------------------------------------- | -------------
+`%f`   | Full path to recording                    |  /home/user/Videos/News.mkv
+`%b`   | Basename of recording                     |  News.mkv
+`%c`   | Channel name                              |  BBC world
+`%O`   | Owner of this recording                   |  user
+`%C`   | Who created this recording                |  user
+`%t`   | Program title                             |  News
+`%s`   | Program subtitle                          |  Afternoon
+`%p`   | Program episode                           |  S02.E07
+`%d`   | Program description                       |  News and stories…
+`%e`   | Error message                             |  Aborted by user
+`%S`   | Start time stamp of recording, UNIX epoch |  1224421200
+`%E`   | Stop time stamp of recording, UNIX epoch  |  1224426600
+`%r`   | Number of errors during recording         |  0
+`%R`   | Number of data errors during recording    |  6
+`%i`   | Streams (comma separated)                 |  H264,AC3,TELETEXT
+
+*Example usage*
+
+To use special characters (e.g. spaces), either put the string in quotes or
+escape the individual characters.
+
+```/usr/bin/tvh_file_removed "%f"```
diff --git a/docs/property/preprocessor.md b/docs/property/preprocessor.md
new file mode 100644 (file)
index 0000000..f2da6bc
--- /dev/null
@@ -0,0 +1,26 @@
+: Command to run when a recording starts. The command will be run in
+  background.
+
+ Supported format strings:
+
+
+Format | Description                               | Example value
+:-----:| ----------------------------------------- | -------------
+`%f`   | Full path to recording                    |  /home/user/Videos/News.mkv
+`%b`   | Basename of recording                     |  News.mkv
+`%c`   | Channel name                              |  BBC world
+`%O`   | Owner of this recording                   |  user
+`%C`   | Who created this recording                |  user
+`%t`   | Program title                             |  News
+`%s`   | Program subtitle                          |  Afternoon
+`%p`   | Program episode                           |  S02.E07
+`%d`   | Program description                       |  News and stories…
+`%S`   | Start time stamp of recording, UNIX epoch |  1224421200
+`%E`   | Stop time stamp of recording, UNIX epoch  |  1224426600
+
+*Example usage*
+
+To use special characters (e.g. spaces), either put the string in quotes or
+escape the individual characters.
+
+```/usr/bin/lcd_show "%f"```
index ed8c7384571c2cb916f3da07731c6789ddb59d6e..6ac78d22c74a3e9a27ab72dc9d89c2b07727ebdd 100644 (file)
@@ -792,7 +792,10 @@ dvr_config_class_pathname_set(void *o, const void *v)
 }
 
 CLASS_DOC(dvrconfig)
+PROP_DOC(preprocessor)
 PROP_DOC(postprocessor)
+PROP_DOC(postremove)
+PROP_DOC(pathname)
 
 const idclass_t dvr_config_class = {
   .ic_class      = "dvrconfig",
@@ -1023,6 +1026,7 @@ const idclass_t dvr_config_class = {
       .name     = N_("Pre-processor command"),
       .desc     = N_("Script/program to be run when a recording starts "
                      "(service is subscribed but no filename available)."),
+      .doc      = prop_doc_preprocessor,
       .off      = offsetof(dvr_config_t, dvr_preproc),
       .opts     = PO_EXPERT,
       .group    = 1,
@@ -1032,6 +1036,7 @@ const idclass_t dvr_config_class = {
       .id       = "postproc",
       .name     = N_("Post-processor command"),
       .desc     = N_("Script/program to be run when a recording completes."),
+      .doc      = prop_doc_postprocessor,
       .off      = offsetof(dvr_config_t, dvr_postproc),
       .opts     = PO_ADVANCED,
       .group    = 1,
@@ -1041,6 +1046,7 @@ const idclass_t dvr_config_class = {
       .id       = "postremove",
       .name     = N_("Post-remove command"),
       .desc     = N_("Script/program to be run when a recording gets removed."),
+      .doc      = prop_doc_postremove,
       .off      = offsetof(dvr_config_t, dvr_postremove),
       .opts     = PO_EXPERT,
       .group    = 1,
@@ -1127,7 +1133,7 @@ const idclass_t dvr_config_class = {
       .desc     = N_("The string allows you to manually specify the "
                      "full path generation using predefined "
                      "modifiers. See Help for full details."),
-      .doc      = prop_doc_postprocessor,
+      .doc      = prop_doc_pathname,
       .set      = dvr_config_class_pathname_set,
       .off      = offsetof(dvr_config_t, dvr_pathname),
       .opts     = PO_EXPERT,