Bug #2318
[PVR] scheduled dvr entries destroyed on exit of tvh
0%
Description
Every dvr entry in state DVR_SCHEDULED will be removed from disk on tvh exit
"callstack"
hts_settings_remove // ("dvr/log/%s", idnode_uuid_as_str(&de->de_id))
dvr_entry_destroy
dvr_entry_cancel // => case DVR_SCHEDULED
dvr_autorec_purge_spawns
autorec_entry_destory
autorec_destroy_by_channel
channel_delete
channel_done
main
(Same logic for both autorec and timerec)
This behavior leads in recreation of the entries on every tvh startup which leads to more and more duplicate timers in XBMCs timer list in case XBMC stays active while tvh gets restarted. This is a real life scenario where XBMC gets suspended/resumed on htpc shutdown while tvheadend is actually exiting and restarting (openelec default behavior afaik).
BTW: XBMC does not recognize destruction of those pvr entries! Don't know whether this actually is a tvh problem.
History
Updated by Rob vh almost 8 years ago
what happens to recordings that were scheduled for one time recording? Are they forever deleted? Or are only the autorec entries deleted?
Updated by Kai Sommerfeld almost 8 years ago
The database entries for scheduled but not yet recorded stuff will be deleted on exit of tvh.
Updated by Jaroslav Kysela almost 8 years ago
In case of suspend of the xbmc htsp client, the client is reponsible to retrieve the new PVR database state on wakeup, isn't? It does not seem like a tvh issue.
Also, I believe that the new TCP HTSP connection is created in this case, so blame client to not do the proper handshake / initialization / old internal PVR data purge...
Updated by Kai Sommerfeld almost 8 years ago
Makes sense. Seems to be a client issue in the first place.
Nevertheless, why are things so complicated on tvh side? Write all pvr entries matching autorec/timesched rules to disk on startup, wipe them from disk on tvh exit, recreate them with a different uuid (which causes the trouble with xbmc, btw.), to write them to disk on next tvh startup, to wipe them again on exit, ... ? Why are those entries written to disk at all?
Updated by Kai Sommerfeld almost 8 years ago
Fixed this in XBMC PVR tvheadend addon. PR: https://github.com/opdenkamp/xbmc-pvr-addons/pull/357
Updated by Jaroslav Kysela over 7 years ago
- Status changed from New to Fixed
Note that the autorec entries are not deleted from disc now on exit in tvh to avoid client "new event scheduled" notifications. Closing as fixed for both sides...