e, 0, 0,
perm->aa_username,
perm->aa_representative,
- NULL, DVR_PRIO_NORMAL, DVR_RET_DVRCONFIG, DVR_RET_DVRCONFIG, comment);
+ NULL, DVR_PRIO_NORMAL, DVR_RET_DVRCONFIG,
+ DVR_RET_DVRCONFIG, comment);
if (de)
dvr_entry_save(de);
}
dvr_autorec_get_retention_days( dvr_autorec_entry_t *dae )
{
if (dae->dae_retention > 0) {
+ uint32_t removal = dvr_autorec_get_removal_days(dae);
/* As we need the db entry when deleting the file on disk */
- if (dvr_autorec_get_removal_days(dae) != DVR_RET_FOREVER &&
- dvr_autorec_get_removal_days(dae) > dae->dae_retention)
+ if (removal != DVR_RET_FOREVER && removal > dae->dae_retention)
return DVR_RET_ONREMOVE;
return dae->dae_retention;
uint32_t retention = dvr_entry_get_retention_days(de);
stop = de->de_stop + removal * (time_t)86400;
- if ((removal > 0 || retention == 0) && removal < DVR_RET_SPACENEED) {
+ if ((removal > 0 || retention == 0) && removal < DVR_RET_SPACENEED) {
if (stop > dispatch_clock) {
dvr_entry_retention_arm(de, dvr_timer_remove_files, stop);
return;
if((http_arg_get(&hc->hc_req_args, "rec")) != NULL) {
de = dvr_entry_create_by_event(1, NULL, e, 0, 0, hc->hc_username ?: NULL,
hc->hc_representative ?: NULL, NULL,
- DVR_PRIO_NORMAL, DVR_RET_DVRCONFIG,
- DVR_RET_DVRCONFIG, "simpleui");
+ DVR_PRIO_NORMAL, DVR_RET_DVRCONFIG,
+ DVR_RET_DVRCONFIG, "simpleui");
} else if(de != NULL && (http_arg_get(&hc->hc_req_args, "cancel")) != NULL) {
de = dvr_entry_cancel(de, 0);
}