Use the autorec rule name in the Upcoming tab if the comment field is empty [mini-patch]
Currently the Upcoming recordings tab has a comment field that says "Auto recording" or "Auto recording: <comment from autorec rule>". This helps to identify why a recording is scheduled.
I never knew the second format existed until I looked at the code.
Since my comment field would almost always be the same as my rule name, I submit a mini-patch to use the autorec comment field if it is non-empty (keeping existing behaviour), but fallback to the recording rule name. If both are empty then it keep the existing behaviour of fallback to an empty string.
So, in the above case it would be "Auto recording: <comment>", "Auto recording: <rule name>", otherwise "Auto recording".
The name change only occurs after a schedule is triggered, so you will only see a difference with new recordings or if you modify an autorec rule.
diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c index 828ca1a4a..9a6a6fbd5 100644 --- a/src/dvr/dvr_db.c +++ b/src/dvr/dvr_db.c @@ -1463,9 +1463,11 @@ dvr_entry_create_by_autorec(int enabled, epg_broadcast_t *e, dvr_autorec_entry_t } } + /* Prefer the recording comment or the name of the rule to an empty string */ + const char *comment_suffix = dae->dae_comment ?: dae->dae_name ?: ""; snprintf(buf, sizeof(buf), _("Auto recording%s%s"), - dae->dae_comment ? ": " : "", - dae->dae_comment ?: ""); + comment_suffix ? ": " : "", + comment_suffix ?: ""); dvr_entry_create_by_event(enabled, idnode_uuid_as_str(&dae->dae_config->dvr_id, ubuf), e, dae->dae_start_extra, dae->dae_stop_extra,
Updated by Em Smith over 5 years ago
All of my autorecs are manually created to be quite generic ("record any movie that has these actors"), rather than autorecs based on EPG.
For your issue, the GUI is generating a generic comment string and no rule name so this patch doesn't help. I think this patch should respect the comment field since it could be entered by the user.
However, I submitted a patch in your bug to include the title in future autorec comments which should help your issue.