Currently, TVH will allow unlimited scheduling of concurrent recordings. If there are insufficient tuners to service all scheduled recordings, some recordings will be missed resulting in (what I am referring to as) a 'Scheduling Conflict'.
There is an external tool that can help identify these conflicts, however, I would like to explore the possibility of incorporating this functionality directly into TVH and alerting users immediately.
dave-p/TVHadmin-JS
Even though a recording is set for a specified 'Channel', TVH navigates links from Channels -> Services -> Muxes -> Networks -> Adapters (tuners) before the recording can actually take place.
https://docs.tvheadend.org/documentation/setup/concepts#applicationtvheadend-fundamentals
Because a 'Mux' can support multiple concurrent recordings, detecting future scheduling conflicts will involve not only examining overlapping recordings, but also which muxes are involved and which tuners can service them.
Recordings for IPTV channels can also complicate matters because they do not have 'adapters' but can be restricted by the number of concurrent streams at the 'Network' level.
'Timers' can also complicate matters because only the next resulting recording is scheduled at any time. Consequently, a Scheduling Conflict involving a timer may not arise until the day that the recording is due. In order to include timers in scheduling conflict detection, every future instance of a timer will need to be calculated and taken into account.
The least predictable recording feature is the 'AutoRec' because these respond to external changes in the the form of EPG updates potentially resulting in a recording being scheduled at very short notice.
TVH already has a priority assignment system for recordings, services and adapters, however, should multiple recordings have the same priority settings, the recording that is eventually missed can not be precisely determined in advance.
Because it is not possible to determine exactly which scheduled recording will fail in advance, my proposal is a solution involving the creation of 'Conflict Groups'. Every overlapping scheduled recording that is involved in a conflict will be tagged and grouped together. The user will then be required to resolve the conflict manually by editing one of the members of the group. In future, it may also be possible to use the EPG CRID to look ahead and find alternate occurrences of a conflicting recording. If this is the case, then the conflict could be resolved automatically.
Thoughts and comments are welcome.