-
-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
描述错误
@ArchieMeng 将BiliBili Add-On迁移到Python 3时似乎遗漏该处,导致部分内容会报错
2021-11-02 11:23:57.169 T:30480 ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'TypeError'>
Error Contents: can only concatenate str (not "bytes") to str
Traceback (most recent call last):
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.bilibili/addon.py", line 3031, in <module>
plugin.run()
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 338, in run
items = self._dispatch(self.request.path)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/script.module.xbmcswift2/lib/xbmcswift2/plugin.py", line 312, in _dispatch
listitems = view_func(**items)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.bilibili/addon.py", line 2283, in sources
sources = get_sources(url)
File "/storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/plugin.video.bilibili/addon.py", line 1801, in get_sources
ename = '正片 : ' + elist[index]['title'] + ' - ' + elist[index][
TypeError: can only concatenate str (not "bytes") to str
-->End of Python script error report<--
尝试修改为
ename = '正片 : ' + str(elist[index]['title']) + ' - ' + elist[index][
'longTitle'] + ' [COLOR pink][' + elist[index]['badge'] + '][/COLOR]'
可以正常工作
重现
重现行为的步骤:
- 去 '打开Kodi运行Bilibili Add-On'
- 点击 '电视剧分类'
- 划到 '第八号当铺 第一季'
- 点击,出错
预期行为
正常显示分集
屏幕截图
如果适用,请添加屏幕截图以帮助解释您的问题
设备信息
- 设备: Shield TV 2019 Pro
- 系统: Android 9
- Kodi 版本: Kodi 20
其他
在此处添加有关该问题的任何其他上下文
Metadata
Metadata
Assignees
Labels
No labels