Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[script.timers] 3.9.1 #2628

Merged
merged 1 commit into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion script.timers/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.timers" name="Timers" version="3.9.0" provider-name="Heckie">
<addon id="script.timers" name="Timers" version="3.9.1" provider-name="Heckie">
<requires>
<import addon="xbmc.python" version="3.0.0" />
</requires>
Expand Down Expand Up @@ -66,6 +66,9 @@
<website>https://github.com/Heckie75/kodi-addon-timers</website>
<source>https://github.com/Heckie75/kodi-addon-timers</source>
<news>
v3.9.1 (2024-06-30)
- Bugfix: Prevent exception after changing already running non-fading-timer to fading-timer

v3.9.0 (2023-11-11)
- Add new system action 'restart Kodi'
- Add new extra feature to prevent display off when audio is playing
Expand Down
3 changes: 3 additions & 0 deletions script.timers/resources/lib/player/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def onPlayBackStopped(self) -> None:
_rst = self._running_stop_at_end_timer
self._reset()
if _rst[0] and not _rst[1]:
xbmc.log("set timer to be already stopped: %s" % str(_rst[0]), xbmc.LOGINFO)
self._running_stop_at_end_timer = (_rst[0], True)
showNotification(_rst[0], msg_id=32289)

Expand Down Expand Up @@ -210,6 +211,8 @@ def resumeFormerOrStop(self, timer: Timer) -> None:
self.stopPlayer(PICTURE)
elif timer != self._running_stop_at_end_timer[0] or not self._running_stop_at_end_timer[1]:
self.stop()
else:
xbmc.log("Skip timer's stop action since timer's playback has already been stopped by user: %s" % str(self._running_stop_at_end_timer[0]), xbmc.LOGINFO)

self._reset(type=timer.media_type)
xbmc.sleep(self._RESPITE)
Expand Down
3 changes: 3 additions & 0 deletions script.timers/resources/lib/timer/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ def _has_changed(former_timer: Timer, timer_from_storage: Timer) -> 'tuple[bool,
if former_timer.is_fading_timer():
changed |= (former_timer.vol_min != timer_from_storage.vol_min)
changed |= (former_timer.vol_max != timer_from_storage.vol_max)
elif timer_from_storage.is_fading_timer():
changed = True
restart = True

return changed, restart

Expand Down
Loading