Merge pull request #732 from croneter/fix-typeerror
Fix rare TypeError: unsupported operand type(s) for /: 'NoneType' and 'int' on playback startup
This commit is contained in:
commit
78def504bc
1 changed files with 1 additions and 1 deletions
|
@ -414,7 +414,7 @@ def _conclude_playback(playqueue, pos):
|
||||||
if v.KODIVERSION >= 18 and api:
|
if v.KODIVERSION >= 18 and api:
|
||||||
# Kodi 18 Alpha 3 broke StartOffset
|
# Kodi 18 Alpha 3 broke StartOffset
|
||||||
try:
|
try:
|
||||||
percent = item.offset / api.runtime() * 100.0
|
percent = (item.offset or api.resume_point()) / api.runtime() * 100.0
|
||||||
except ZeroDivisionError:
|
except ZeroDivisionError:
|
||||||
percent = 0.0
|
percent = 0.0
|
||||||
LOG.debug('Resuming at %s percent', percent)
|
LOG.debug('Resuming at %s percent', percent)
|
||||||
|
|
Loading…
Reference in a new issue