2015-02-18, 13:45
Same here.. 3.0.7 on Openelec 5.0.2 produces a Script failed.
(2015-02-19, 13:30)warum Wrote: well, now the problem is a ")" in the metadata of the channels sent by DI.
I have modified the regular expresion in "default.py" and added a line to remove the last ")"
here you have the code repaired:
"""
Gets channel metadata from site html and cleans it up
"""
def getChannelMetadata(self, html):
# Will get JSON with all channel metadata
re_channelMeta = re.compile(r"di.app.start\((\{\"channels\":\s*[^;]+);", re.M | re.I)
channelMeta = re_channelMeta.findall(html)[0]
# removes those pesky \u2019 and what not
channelMeta = re.sub(r'\\u[\d\w]{4}','', channelMeta)
# TODO proper handling of \uxxxx characters - en-/decoding issue
# remove the last )
channelMeta = channelMeta[:-1]
channelMeta = json.loads(channelMeta) # parse the json
channelMeta_sorted = {}
for cMeta in channelMeta['channels']: # loop through meta data, using each channel ID as key instead
channelMeta_sorted[cMeta['key']] = cMeta
return channelMeta_sorted
enjoy DI!!!!
it works in premium, I have not tested it in free, but it will probably work also.
(2015-02-21, 09:58)eddedrukker Wrote: And were do i need to put the fixed code from (WARUM) exactly? I can't fix the script error, can someone post the modified default.py so that it works again,Me, too. I modified default.py, but no avail: same script error. Maybe it works only on premium subscriptions...
Thanks
14:26:49 T:5240 NOTICE: [PLUGIN] Digitally Imported v3.0.7 (15. February 2015)
14:26:50 T:5240 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.IndexError'>
Error Contents: list index out of range
Traceback (most recent call last):
File "C:\Users\Administrateur\AppData\Roaming\Kodi\addons\plugin.audio.di.fm\default.py", line 458, in <module>
MusicAddonInstance.run()
File "C:\Users\Administrateur\AppData\Roaming\Kodi\addons\plugin.audio.di.fm\default.py", line 210, in run
channelMeta = self.getChannelMetadata(html)
File "C:\Users\Administrateur\AppData\Roaming\Kodi\addons\plugin.audio.di.fm\default.py", line 272, in getChannelMetadata
channelMeta = re_channelMeta.findall(html)[0]
IndexError: list index out of range
-->End of Python script error report<--
14:26:51 T:6496 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.audio.di.fm/
14:26:51 T:6496 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.di.fm/) failed