Skip to content

Commit

Permalink
[Timeshift] on close, remove Record Event Tracker from RecordTimer.on…
Browse files Browse the repository at this point in the history
…_state_change
  • Loading branch information
Huevos committed Jul 28, 2024
1 parent bdce60c commit 3bbadad
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/python/Components/Timeshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,15 @@ def __init__(self):

# Init PTS Infobar

self.onClose.append(self.__infoBarTimeshiftOnClose)

def __infoBarTimeshiftOnClose(self):
# on close remove Record Event Tracker from RecordTimer.on_state_change (otherwise callback will persist for destroyed instance after calling skin reloader)
print("[InfoBarTimeshift] __infoBarTimeshiftOnClose, remove Record Event Tracker from RecordTimer.on_state_change")
if self.ptsTimerEntryStateChange in self.session.nav.RecordTimer.on_state_change:
self.session.nav.RecordTimer.on_state_change.remove(self.ptsTimerEntryStateChange)


def __seekableStatusChanged(self):
# print("[Timeshift]__seekableStatusChanged")
self["TimeshiftActivateActions"].setEnabled(not self.isSeekable() and self.timeshiftEnabled() and int(config.timeshift.startdelay.value))
Expand Down

0 comments on commit 3bbadad

Please sign in to comment.