]> git.ipfire.org Git - thirdparty/tvheadend.git/commit
DVR: Prefer autorec rule name if comment field is empty (#4500)
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Sun, 3 Sep 2017 11:35:05 +0000 (12:35 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 18 Sep 2017 13:13:34 +0000 (15:13 +0200)
commitffb578c4869bc0cb5c4cabed59dc7168c5132b9f
treed259a06493cbdfcd74a28b9d4747d69070eb3ed8
parent45243abd2bd83d9fb2c68b9c402441425e21ba8c
DVR: Prefer autorec rule name if comment field is empty (#4500)

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.

This patch ensures we continue to use the autorec comment field if
it is non-empty (keeping existing behaviour), but fallback to using
the recording rule name. If both are empty then we keep the
existing behaviour of fallback to an empty string.

This avoids the user having to duplicate the rule name in to
the comment string for manually created autorec rules.

So, in the above case it would be "Auto recording: <comment>",
"Auto recording: <rule name>", otherwise "Auto recording".

Fixes: #4500.
src/dvr/dvr_db.c