Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR: Allow custom path/filename specification, fixes #2534
  • Loading branch information
perexg committed May 21, 2015
1 parent 3379f94 commit 4398654
Show file tree
Hide file tree
Showing 7 changed files with 656 additions and 184 deletions.
39 changes: 29 additions & 10 deletions docs/html/config_dvr.html
Expand Up @@ -111,18 +111,37 @@
<dt>Filename charset
<dd>Character set for the created filename. Tvheadend will try to approximate characters to similarly looking ones.

<dt>Rewrite PAT in passthrough mode
<dd>Rewrite the original Program Association Table to only include the active service. When this option is disabled, Tvheadend will write the original PAT as broadcast, which lists all services from the original multiplex.

<dt>Rewrite PMT in passthrough mode
<dd>Generate a Program Map Table only listing the streams actually in the output transport stream. When this option is disabled, Tvheadend will write the original Program Map Table as broadcast, which may include references to excluded streams such as data and ECMs.

<dt>Tag files with metadata
<dd>If checked, media containers that support metadata will be tagged with the metadata associated with the event being recorded.

<dt>Skip commercials
<dd>If checked, commercials will be dropped from the recordings. At the moment, commercial detection only works for the swedish channel TV4.

<br><br>
<hr>
<b>Full Pathname Specification</b>
<hr>

<dt>Format String
<dd>The string allow to manually specify the full path generation using
the predefined modifiers for strftime (see '<i>man strftime</i>', except
<i>%n</i> and <i>%t</i>) and Tvheadend specific. Note that you may modify some of
this format string setting using the GUI fields bellow.

<table class="hts-doc-text" border="0">
<tr><th>Format</th><th>Description</th><th>Example</th></tr>
<br>
<tr><td>$t$n.$x</td><td>Default format (title, unique number, extension)</td><td>Tenis - Wimbledon-1.mkv</td></tr>
<br>
<tr><td>$t</td><td>Event title name</td><td>Tenis - Wimbledon</td></tr>
<tr><td>$e</td><td>Event episode name</td><td>S02-E06</td></tr>
<tr><td>$n</td><td>Unique number added when the file already exists&nbsp;&nbsp;&nbsp;&nbsp;</td><td>-1</td></tr>
<tr><td>$x</td><td>Filename extension (from the active stream muxer</td><td>mkv</td></tr>
<br>
<tr><td>%F</td><td>ISO 8601 date format</td><td>2011-03-19</td></tr>
<tr><td>%R</td><td>The time in 24-hour notation</td><td>14:12</td></tr>
</table>

<br><br>
<hr>
<b>Subdirectory Options</b>
Expand All @@ -136,12 +155,12 @@
<br>
<tr><td>0755 == rwxr-xr-x</td></tr>
<tr><td>0775 == rwxrwxr-x (default)</td></tr>
<tr><td>0777 == rwxrwxrwx</td></tr>
</table>
<tr><td>0777 == rwxrwxrwx</td></tr>
</table>

Note that the applicable umask applies, so 0777 with umask 0022 will produce 0755 (rwxr-xr-x).
Note that the applicable umask applies, so 0777 with umask 0022 will produce 0755 (rwxr-xr-x).

See also <i>File permissions</i> in <i>Recording File Options</i>.
See also <i>File permissions</i> in <i>Recording File Options</i>.

<dt>Make sub-directories per day
<dd>If checked, create a new directory per day in the recording system path. Only days when anything is recorded will be created. The format of the directory will be 'YYYY-MM-DD' (ISO standard)
Expand Down
6 changes: 3 additions & 3 deletions src/dvr/dvr.h
Expand Up @@ -49,6 +49,9 @@ typedef struct dvr_config {

muxer_config_t dvr_muxcnf;

char *dvr_pathname;
int dvr_pathname_changed;

int dvr_dir_per_day;
int dvr_channel_dir;
int dvr_channel_in_title;
Expand All @@ -62,7 +65,6 @@ typedef struct dvr_config {
int dvr_tag_files;
int dvr_skip_commercials;
int dvr_subtitle_in_title;
int dvr_episode_before_date;
int dvr_windows_compatible_filenames;

/* Series link support */
Expand Down Expand Up @@ -391,8 +393,6 @@ void dvr_config_destroy_by_profile(profile_t *pro, int delconf);
*
*/

void dvr_make_title(char *output, size_t outlen, dvr_entry_t *de);

uint32_t dvr_usage_count(access_t *aa);

static inline int dvr_entry_is_editable(dvr_entry_t *de)
Expand Down

0 comments on commit 4398654

Please sign in to comment.