From e3698efe832587897839db2e862cd6bbdf9daaaa Mon Sep 17 00:00:00 2001 From: Jeremy Daalder Date: Sun, 19 Nov 2023 06:24:12 +1100 Subject: [PATCH] [script.service.playbackresumer] 2.0.5 (#2511) --- script.service.playbackresumer/addon.xml | 54 +++++++++---------- script.service.playbackresumer/changelog.txt | 3 ++ .../resources/lib/player.py | 6 +-- 3 files changed, 33 insertions(+), 30 deletions(-) diff --git a/script.service.playbackresumer/addon.xml b/script.service.playbackresumer/addon.xml index 418394d53d..0e85d60b60 100644 --- a/script.service.playbackresumer/addon.xml +++ b/script.service.playbackresumer/addon.xml @@ -1,27 +1,27 @@ - - - - - - - - Periodically sets the resume point of videos and can automatically resume last played video if Kodi crashes. - - Runs as a service and will periodically update the resume point while videos are playing, so you can re-start from where you were in the event of a crash. It can also automatically resume a video if Kodi was shutdown while playing it. See setting to configure how often the resume point is set, and whether to automatically resume. - - all - GPL-3.0-only - https://github.com/bossanova808/script.service.playbackresumer - https://github.com/bossanova808/script.service.playbackresumer - https://forum.kodi.tv/showthread.php?tid=355383 - bossanova808@gmail.com - v2.0.4 - - Handle unicode characters in video names - - - icon.png - - - - - + + + + + + + + Periodically sets the resume point of videos and can automatically resume last played video if Kodi crashes. + + Runs as a service and will periodically update the resume point while videos are playing, so you can re-start from where you were in the event of a crash. It can also automatically resume a video if Kodi was shutdown while playing it. See setting to configure how often the resume point is set, and whether to automatically resume. + + all + GPL-3.0-only + https://github.com/bossanova808/script.service.playbackresumer + https://github.com/bossanova808/script.service.playbackresumer + https://forum.kodi.tv/showthread.php?tid=355383 + bossanova808@gmail.com + v2.0.5 + - Fix odd reported bug with resume points + + + icon.png + + + + + diff --git a/script.service.playbackresumer/changelog.txt b/script.service.playbackresumer/changelog.txt index aec4e62774..a92f823fd3 100644 --- a/script.service.playbackresumer/changelog.txt +++ b/script.service.playbackresumer/changelog.txt @@ -1,3 +1,6 @@ +v2.0.5 +- Fix wierd bug with resume points: https://forum.kodi.tv/showthread.php?tid=355383&pid=3163480#pid3163480 + v2.0.4 - Handle unicode characters in video names diff --git a/script.service.playbackresumer/resources/lib/player.py b/script.service.playbackresumer/resources/lib/player.py index 11a9625ef2..89cbff5914 100644 --- a/script.service.playbackresumer/resources/lib/player.py +++ b/script.service.playbackresumer/resources/lib/player.py @@ -179,11 +179,11 @@ def update_resume_point(self, seconds): id_name: Store.library_id, "resume": { "position": seconds, - # "total": 0 # Not needed: https://forum.kodi.tv/showthread.php?tid=161912&pid=1596436#pid1596436 + "total": Store.length_of_currently_playing_file } } }) - send_kodi_json(f'Set resume point to {seconds}', query) + send_kodi_json(f'Set resume point to {seconds}, total to {Store.length_of_currently_playing_file}', query) # For debugging - let's retrieve and log the current resume point... query = json.dumps({ @@ -195,7 +195,7 @@ def update_resume_point(self, seconds): "properties": ["resume"], } }) - send_kodi_json(f'Get resume point for id {Store.library_id}', query) + send_kodi_json(f'Check new resume point & total for id {Store.library_id}', query) def resume_if_was_playing(self): """