Skip to content

Commit

Permalink
[script.service.playbackresumer] 2.0.5 (#2511)
Browse files Browse the repository at this point in the history
  • Loading branch information
bossanova808 committed Nov 18, 2023
1 parent 153ced0 commit e3698ef
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 30 deletions.
54 changes: 27 additions & 27 deletions script.service.playbackresumer/addon.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.service.playbackresumer" name="Kodi Playback Resumer" version="2.0.4" provider-name="bossanova808, bradvido88">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
</requires>
<extension point="xbmc.service" library="default.py" />
<extension point="xbmc.addon.metadata">
<summary lang="en_GB">Periodically sets the resume point of videos and can automatically resume last played video if Kodi crashes.</summary>
<description lang="en_GB">
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.
</description>
<platform>all</platform>
<license>GPL-3.0-only</license>
<website>https://github.com/bossanova808/script.service.playbackresumer</website>
<source>https://github.com/bossanova808/script.service.playbackresumer</source>
<forum>https://forum.kodi.tv/showthread.php?tid=355383</forum>
<email>bossanova808@gmail.com</email>
<news>v2.0.4
- Handle unicode characters in video names
</news>
<assets>
<icon>icon.png</icon>
</assets>
</extension>
</addon>


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.service.playbackresumer" name="Kodi Playback Resumer" version="2.0.5" provider-name="bossanova808, bradvido88">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
</requires>
<extension point="xbmc.service" library="default.py" />
<extension point="xbmc.addon.metadata">
<summary lang="en_GB">Periodically sets the resume point of videos and can automatically resume last played video if Kodi crashes.</summary>
<description lang="en_GB">
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.
</description>
<platform>all</platform>
<license>GPL-3.0-only</license>
<website>https://github.com/bossanova808/script.service.playbackresumer</website>
<source>https://github.com/bossanova808/script.service.playbackresumer</source>
<forum>https://forum.kodi.tv/showthread.php?tid=355383</forum>
<email>bossanova808@gmail.com</email>
<news>v2.0.5
- Fix odd reported bug with resume points
</news>
<assets>
<icon>icon.png</icon>
</assets>
</extension>
</addon>


3 changes: 3 additions & 0 deletions script.service.playbackresumer/changelog.txt
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions script.service.playbackresumer/resources/lib/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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):
"""
Expand Down

0 comments on commit e3698ef

Please sign in to comment.