APP下载 微博 微信

Hao4K影音

[KODI] Kodi 字幕插件下载字幕时出错 RuntimeError: XBMC is not playing any file

[复制链接]

发表于 2020年07月20日 14:50 91441 3 来源:多媒体软件> KODI |只看大图 回帖奖励 |正序浏览 |

Papillon 帖主

2020-7-20 14:50

上周末折腾了几个小时,终于安装上了一些中文插件 https://github.com/taxigps/xbmc-addons-chinese
但是 SubHD, Zumuzu, Zumuku 这些字幕插件,可以搜索到字幕,但是点某个字幕下载时,在弹出的窗口里则是空的;遇到一两个不是空的,点击下载时,则在右上角提示下载失败。
我用的是 Kodi v18.6 x64 on Windows 10; Android 版是 Kodi v18.6 on Sony 9000H. 都下载不了字幕。
在电脑上看了日志:
  1. <div>2020-07-20 09:37:30.980 T:26228   ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://service.subtitles.subhd/?action=download&link=http://subhd.tv/a/364808&lang=['/xe7/xae/x80/xe4/xbd/x93', '/xe8/x8b/xb1/xe6/x96/x87', '/xe5/xad/x97/xe5/xb9/x95/xe7/xbf/xbb/xe8/xaf/x91']</div><div>2020-07-20 09:37:32.128 T:24828   ERROR: EXCEPTION: XBMC is not playing any file</div><div>2020-07-20 09:37:32.129 T:24828   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--</div><div>                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!</div><div>                                            Error Type: <type 'exceptions.RuntimeError'></div><div>                                            Error Contents: XBMC is not playing any file</div><div>                                            Traceback (most recent call last):</div><div>                                              File "C:\Users\minliu\AppData\Roaming\Kodi\addons\service.subtitles.subhd\service.py", line 200, in <module></div><div>                                                item['file_original_path'] = urllib.unquote(xbmc.Player().getPlayingFile().decode('utf-8'))  # Full path of a playing file</div><div>                                            RuntimeError: XBMC is not playing any file</div><div>                                            -->End of Python script error report<--</div>
复制代码


似乎是插件里的 Python 脚本在调用 xbmc.Player().getPlayingFile().decode('utf-8') 获得当前正在播放的文件名时抛出了异常。所以可能是 Kodi bug,然而搜索之后发现这样的 bug 在 2012 年就修复了 https://github.com/xbmc/xbmc/commit/c6c47ad991e5b788cdfbb7144b276ba631ffd409

有没有人遇到这样的问题?难道要等到 Kodi 解决?
回复

使用道具 举报

全部回复3

heartzc 4

2020-7-21 00:17

谢谢楼下的分享。
回复 支持 反对

使用道具 举报

lolipopzar 3

2020-7-20 15:46

最近也刚用字幕插件,一样下载失败,等大神修复
回复 支持 反对

使用道具 举报

Papillon 2

2020-7-20 15:32

刚才试验了一下,在暂停状态下,是可以获得正在播放的文件路径的。
1. 安装这个交互式 Python 插件 https://github.com/kharts/konsodi
2. 随便播放一个文件
3. 运行交互式插件,输入以下代码:
  1. import xbmc
  2. path = xbmc.Player().getPlayingFile().decode('utf-8')
  3. path
复制代码

能获得当前播放的文件路径。
PlayingFile_small.png

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

返回列表 本版积分规则



绑定微信 + 关注公众号,第一时间获得消息通知!