char *dvr_storage;
int dvr_pri;
int dvr_clone;
+ int dvr_complex_scheduling;
uint32_t dvr_rerecord_errors;
uint32_t dvr_retention_days;
uint32_t dvr_removal_days;
.opts = PO_ADVANCED,
.group = 1,
},
+ {
+ .type = PT_BOOL,
+ .id = "complex-scheduling",
+ .name = N_("For autorecs, attempt to find better time slots"),
+ .desc = N_("When scheduling an autorec, this option attempts "
+ "to schedule at the earliest time and on the 'best' "
+ "channel (such as channel with the most failover services). "
+ "This is useful when multiple timeshift "
+ "and repeat channels are available. Without this option "
+ "autorecs may get scheduled on timeshift channels "
+ "instead of on primary channels. "
+ "This scheduling "
+ "requires extra overhead so is disabled by default."),
+ .off = offsetof(dvr_config_t, dvr_complex_scheduling),
+ .opts = PO_ADVANCED,
+ .group = 1,
+ },
{
.type = PT_STR,
.id = "comment",
LIST_FOREACH(de, &dvrentries, de_global_link) {
if (de->de_bcast == e || epg_episode_match(de->de_bcast, e))
if (strcmp(dae->dae_owner ?: "", de->de_owner ?: "") == 0) {
- /* See if our new broadcast is better than our existing schedule */
+ /* See if our new broadcast is better than our existing schedule,
+ * but only if user want this overhead.
+ */
+ if (!dae->dae_config || !dae->dae_config->dvr_profile)
+ return;
+
+ if (!dae->dae_config->dvr_complex_scheduling)
+ return;
/* Our autorec can never be better than a manually scheduled programme
* since user might schedule to avoid conflicts.