]> git.ipfire.org Git - thirdparty/tvheadend.git/commit
dvr: Add autorec for new-only. (#1167).
authorE.Smith <31170571+azlm8t@users.noreply.github.com>
Tue, 5 Dec 2017 16:43:52 +0000 (16:43 +0000)
committerJaroslav Kysela <perex@perex.cz>
Sun, 10 Dec 2017 15:41:11 +0000 (16:41 +0100)
commita3b8ae3ffd23eccb3020ef472599ef329736645e
tree3e2229388f5a0cf2c72f3076a3d99170d32d2923
parentb2ca635b440e28ed878f72faa55990801abbce48
dvr: Add autorec for new-only. (#1167).

Previously we had "all", "new/unknown", and "repeat", but
no ability to only record episodes marked as "new". So we
rename DVR_AUTOREC_BTYPE_NEW to DVR_AUTOREC_BTYPE_NEW_OR_UNKNOWN
to remain backward compatibility with existing autorec
rules and add new semantics for DVR_AUTOREC_BTYPE_NEW.

We don't update htsp since it currently does not send the
broadcast type field.

Also alter DVR_AUTOREC_BTYPE_NEW_OR_UNKNOWN since
previously we never checked 'new' but instead checked 'repeat'.
However, SD has a previously-shown for all programmes (even first
showings) which causes us to mark programmes as repeat.

It is difficult to fix the repeat logic without breaking existing
behaviour since in the US a programme can be a premiere but have
a previously-shown of the previous day due to timezone differences
on the coasts. Similarly, programmes can be premiere outside the US
but have a previously shown date from the US or from a different channel.
For that reason we now check 'new' instead of 'repeat'.

Real example: Programme is shown on channel A at 9pm and on A+1 timeshift
channel at 10pm. Both are marked as "new" in the paper/OTA tv guide. However,
the programme was actually first shown three years ago on a premium
channel, so it's actually also a repeat since it has been shown before.
So the programme is both a new episode and a repeat episode.

Similarly, one of my tv channel insists Roger Moore Bond films from the
1970s are "new" even though most people would consider them a repeat,
but since it's the first time that particular channel has aired it
they use the "new" tag.

Issue: #1167.
src/dvr/dvr.h
src/dvr/dvr_autorec.c