Project

General

Profile

Bug #2318

[PVR] scheduled dvr entries destroyed on exit of tvh

Added by Kai Sommerfeld almost 6 years ago. Updated almost 6 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
Category:
PVR / DVR
Target version:
-
Start date:
2014-09-20
Due date:
% Done:

0%

Estimated time:
Found in version:
3.9.1550~g24e2c3d
Affected Versions:

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

#1

Updated by Rob vh almost 6 years ago

what happens to recordings that were scheduled for one time recording? Are they forever deleted? Or are only the autorec entries deleted?

#2

Updated by Kai Sommerfeld almost 6 years ago

The database entries for scheduled but not yet recorded stuff will be deleted on exit of tvh.

#3

Updated by Jaroslav Kysela almost 6 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...

#4

Updated by Kai Sommerfeld almost 6 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?

#5

Updated by Kai Sommerfeld almost 6 years ago

Fixed this in XBMC PVR tvheadend addon. PR: https://github.com/opdenkamp/xbmc-pvr-addons/pull/357

#6

Updated by Jaroslav Kysela almost 6 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...

Also available in: Atom PDF