Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use iso format for date in default timerec title
as local date format often conflicts with sorting/playback order
also update documentation with pointers to escape-code documentation
  • Loading branch information
cloph authored and perexg committed Feb 17, 2015
1 parent 6327ca6 commit 2f83092
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 9 additions & 4 deletions docs/html/dvr_timerec.html
Expand Up @@ -56,14 +56,19 @@
<p>
<dt><b>Title</b>
<dd>
Not sure how this differs from **Name* *
The title is used in the filename that is created for the recording
<br>
<br>
The default format string suggests Time-[date]-[time]:
The default format string suggests Time-[date]_[time]:
<br>
<br>
%x The local date, formatted according to your locale settings
%R The time in HH;MM format
The escape-codes use <a href="http://man7.org/linux/man-pages/man3/strftime.3.html">strftime</a> format. Examples:
<br>
%F The date in ISO-format (e.g. 2015-02-28)
<br>
%R The time in 24h HH:MM format (e.g. 19:45)
<br>
%x The date, formatted according to your locale settings
<p>
<dt><b>Channel</b>
<dd>
Expand Down
4 changes: 2 additions & 2 deletions src/dvr/dvr_timerec.c
Expand Up @@ -183,7 +183,7 @@ dvr_timerec_create(const char *uuid, htsmsg_t *conf)
return NULL;
}

dte->dte_title = strdup("Time-%x-%R");
dte->dte_title = strdup("Time-%F_%R");
dte->dte_weekdays = 0x7f;
dte->dte_pri = DVR_PRIO_NORMAL;
dte->dte_start = -1;
Expand Down Expand Up @@ -557,7 +557,7 @@ const idclass_t dvr_timerec_entry_class = {
.id = "title",
.name = "Title",
.off = offsetof(dvr_timerec_entry_t, dte_title),
.def.s = "Time-%x-%R",
.def.s = "Time-%F_%R",
},
{
.type = PT_STR,
Expand Down

0 comments on commit 2f83092

Please sign in to comment.