duplicate detect for autorecs
This commit is contained in:
parent
1b2e2c8482
commit
60338204e1
3 changed files with 8 additions and 4 deletions
|
@ -531,7 +531,7 @@ dvr_autorec_create_htsp(const char *dvr_config_name, const char *title, int full
|
|||
channel_t *ch, uint32_t enabled, int32_t start,
|
||||
int32_t start_window, uint32_t days, time_t start_extra,
|
||||
time_t stop_extra, dvr_prio_t pri, int retention,
|
||||
int min_duration, int max_duration,
|
||||
int min_duration, int max_duration, dvr_autorec_dedup_t dup_detect,
|
||||
const char *owner, const char *creator,
|
||||
const char *comment, const char *name, const char *directory);
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ dvr_autorec_create_htsp(const char *dvr_config_name, const char *title, int full
|
|||
channel_t *ch, uint32_t enabled, int32_t start, int32_t start_window,
|
||||
uint32_t weekdays, time_t start_extra, time_t stop_extra,
|
||||
dvr_prio_t pri, int retention,
|
||||
int min_duration, int max_duration,
|
||||
int min_duration, int max_duration, dvr_autorec_dedup_t dup_detect,
|
||||
const char *owner, const char *creator, const char *comment,
|
||||
const char *name, const char *directory)
|
||||
{
|
||||
|
@ -248,6 +248,7 @@ dvr_autorec_create_htsp(const char *dvr_config_name, const char *title, int full
|
|||
htsmsg_add_s64(conf, "stop_extra", stop_extra);
|
||||
htsmsg_add_str(conf, "title", title);
|
||||
htsmsg_add_u32(conf, "fulltext", fulltext);
|
||||
htsmsg_add_u32(conf, "record", dup_detect);
|
||||
htsmsg_add_str(conf, "config_name", dvr_config_name ?: "");
|
||||
htsmsg_add_str(conf, "owner", owner ?: "");
|
||||
htsmsg_add_str(conf, "creator", creator ?: "");
|
||||
|
|
|
@ -774,6 +774,7 @@ htsp_build_autorecentry(dvr_autorec_entry_t *dae, const char *method)
|
|||
htsmsg_add_u32(out, "priority", dae->dae_pri);
|
||||
htsmsg_add_s64(out, "startExtra", dae->dae_start_extra);
|
||||
htsmsg_add_s64(out, "stopExtra", dae->dae_stop_extra);
|
||||
htsmsg_add_u32(out, "dupDetect", dae->dae_record);
|
||||
|
||||
if(dae->dae_title) {
|
||||
htsmsg_add_str(out, "title", dae->dae_title);
|
||||
|
@ -1628,7 +1629,7 @@ htsp_method_addAutorecEntry(htsp_connection_t *htsp, htsmsg_t *in)
|
|||
dvr_autorec_entry_t *dae;
|
||||
const char *dvr_config_name, *title, *creator, *comment, *name, *directory;
|
||||
int64_t start_extra, stop_extra;
|
||||
uint32_t u32, days_of_week, priority, min_duration, max_duration;
|
||||
uint32_t u32, days_of_week, priority, min_duration, max_duration, dup_detect;
|
||||
uint32_t retention, enabled, fulltext;
|
||||
int32_t approx_time, start, start_window;
|
||||
channel_t *ch = NULL;
|
||||
|
@ -1680,6 +1681,8 @@ htsp_method_addAutorecEntry(htsp_connection_t *htsp, htsmsg_t *in)
|
|||
name = "";
|
||||
if (!(directory = htsmsg_get_str(in, "directory")))
|
||||
directory = "";
|
||||
if(htsmsg_get_u32(in, "dupDetect", &dup_detect))
|
||||
dup_detect = DVR_AUTOREC_RECORD_ALL;
|
||||
|
||||
/* Check access */
|
||||
if (ch && !htsp_user_access_channel(htsp, ch))
|
||||
|
@ -1687,7 +1690,7 @@ htsp_method_addAutorecEntry(htsp_connection_t *htsp, htsmsg_t *in)
|
|||
|
||||
dae = dvr_autorec_create_htsp(dvr_config_name, title, fulltext,
|
||||
ch, enabled, start, start_window, days_of_week,
|
||||
start_extra, stop_extra, priority, retention, min_duration, max_duration,
|
||||
start_extra, stop_extra, priority, retention, min_duration, max_duration, dup_detect,
|
||||
htsp->htsp_granted_access->aa_username, creator, comment, name, directory);
|
||||
|
||||
/* create response */
|
||||
|
|
Loading…
Add table
Reference in a new issue