djp952 / pvr.hdhomerundvr

Unofficial Kodi HDHomeRun DVR PVR Client
https://github.com/djp952/pvr.hdhomerundvr/wiki
Other
60 stars 9 forks source link

Cannot delete DateTimeOnly rule that overlaps with a Series rule #5

Closed djp952 closed 7 years ago

djp952 commented 7 years ago

When a DateTimeOnly recording rule is added that overlaps with a Series rule, the timer type displayed in Kodi will be the "Record Series Episode" timer, which cannot be deleted. In order to delete the DateTimeOnly timer the Series rule needs to be deleted and then requires a rather brute force manipulation of the database.

To compound the issue, even after nuking the database, since the EPG entry has already been added, the user can go back and try to reschedule the same episode again with a new DateTimeOnly timer and it will fail because the episode information has been purged. This whole debacle needs to be fixed via a code change so the user can't get themselves into this bad state.

Ideally both timers would display for the user, but if they are destined to always be collapsed into one, the DateTimeOnly timer should take precedence so that it can be manipulated.

djp952 commented 7 years ago

Come to think of it, the disconnect between the EPG and the episode table has to be resolved separately, any out-of-band EPG entries added via this information should be deleted from the EPG otherwise the same thing can happen for anything populated in this manner.

djp952 commented 7 years ago

Turns out there were two problems here, the first one (timer overlap) was caused by not selecting the proper parent recording rule (timer rule) identifier -- when multiple rules referenced a single episode, the arbitrarily first rule found became the parent for all timers. The second (and more nefarious) problem I should have noticed MUCH sooner - only 1 episode timer was ever being set in Kodi for a series rule. This turned out to be an old copy/paste error that happened before v1.0.0 was released. The channel id was being used as the timer id, so Kodi was only displaying one. The originally intended behavior has been restored.

This issue will be marked as closed when v1.0.4 is released.

djp952 commented 7 years ago

Issue closed - addressed in version 1.0.4