Unable to play multi part video in Kodi 19
JayXon opened this issue · 4 comments
JayXon commented
Description:
I can play most videos just fine, but this video is splitted into two files, part1 and part2, and it will stuck after trying to play.
Details:
- Add-on version: 0.3.3
- Kodi version: 19.0
- OS Platform: Android
- Hardware: Shield
Checklist
- I have included a link to a log (or at the very least a link to a forum post with a log) from a session that had the issue
- I have added appropriate GitHub labels
2021-05-16 00:11:37.483 T:14316 ERROR <general>: _________________________________________________________________________________
2021-05-16 00:11:37.484 T:14316 ERROR <general>: script.plex: ERROR:
2021-05-16 00:11:37.484 T:14316 ERROR <general>: Traceback (most recent call last):
2021-05-16 00:11:37.484 T:14316 ERROR <general>: File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/player.py", line 745, in _playVideo
2021-05-16 00:11:37.484 T:14316 ERROR <general>: self.playerObject = self.playerObject.getServerDecision()
2021-05-16 00:11:37.484 T:14316 ERROR <general>: File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/_included_packages/plexnet/plexplayer.py", line 201, in getServerDecision
2021-05-16 00:11:37.484 T:14316 ERROR <general>: decisionPath = self.getDecisionPath(directPlay)
2021-05-16 00:11:37.484 T:14316 ERROR <general>: File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/_included_packages/plexnet/plexplayer.py", line 238, in getDecisionPath
2021-05-16 00:11:37.484 T:14316 ERROR <general>: decisionPath = self.buildTranscode(server, util.AttributeDict(), self.metadata.partIndex, True, False).decisionPath
2021-05-16 00:11:37.484 T:14316 ERROR <general>: File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/_included_packages/plexnet/plexplayer.py", line 457, in buildTranscode
2021-05-16 00:11:37.484 T:14316 ERROR <general>: seekOffset >= obj.startOffset and seekOffset <= obj.get('startOffset', 0) + int(part.duration.asInt() / 1000)
2021-05-16 00:11:37.484 T:14316 ERROR <general>: TypeError: '>=' not supported between instances of 'int' and 'NoneType'
2021-05-16 00:11:37.484 T:14316 ERROR <general>: _________________________________________________________________________________
2021-05-16 00:11:37.484 T:14316 ERROR <general>: `
2021-05-16 00:11:37.484 T:14316 WARNING <general>: xbmc.translatePath is deprecated and might be removed in future kodi versions. Please use xbmcvfs.translatePath instead.
2021-05-16 00:11:37.491 T:14316 ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'AttributeError'>
Error Contents: 'str' object has no attribute 'decode'
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/player.py", line 745, in _playVideo
self.playerObject = self.playerObject.getServerDecision()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/_included_packages/plexnet/plexplayer.py", line 201, in getServerDecision
decisionPath = self.getDecisionPath(directPlay)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/_included_packages/plexnet/plexplayer.py", line 238, in getDecisionPath
decisionPath = self.buildTranscode(server, util.AttributeDict(), self.metadata.partIndex, True, False).decisionPath
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/_included_packages/plexnet/plexplayer.py", line 457, in buildTranscode
seekOffset >= obj.startOffset and seekOffset <= obj.get('startOffset', 0) + int(part.duration.asInt() / 1000)
TypeError: '>=' not supported between instances of 'int' and 'NoneType'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/windows/kodigui.py", line 105, in onInit
self.onFirstInit()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/windows/videoplayer.py", line 91, in onFirstInit
self.play(resume=self.resume)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/windows/videoplayer.py", line 234, in play
player.PLAYER.playVideoPlaylist(self.playQueue, resume=self.resume, session_id=id(self), handler=handler)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/player.py", line 806, in playVideoPlaylist
self._playVideo(resume and self.video.viewOffset.asInt() or 0, seeking=handler and handler.SEEK_PLAYLIST or 0, force_update=True)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/player.py", line 750, in _playVideo
util.ERROR(notify=True)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/util.py", line 143, in ERROR
showNotification('ERROR: {0}'.format(short))
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.plex/lib/util.py", line 179, in showNotification
icon_path = icon_path or xbmc.translatePath(ADDON.getAddonInfo('icon')).decode('utf-8')
AttributeError: 'str' object has no attribute 'decode'
-->End of Python script error report<--
JayXon commented
Looks like
obj.startOffset
needs to be obj.get('startOffset', 0)
garymm commented
This is fixed in my fork:
garymm@787b361
Anyone should feel free to open a PR to fix it here too.
ruuk commented
Submitted to Kodi repo.