[RELEASE] Digitally Imported XBMC addon (Updated 21th February 2015 : V3.0.8)

  Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
roxsman666 Offline
Junior Member
Posts: 1
Joined: Feb 2015
Reputation: 0
Post: #121
Same here.. 3.0.7 on Openelec 5.0.2 produces a Script failed.
find quote
warum Offline
Junior Member
Posts: 1
Joined: Feb 2015
Reputation: 0
Post: #122
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.
(This post was last modified: 2015-02-19 13:33 by warum.)
find quote
bleekselderij Offline
Junior Member
Posts: 2
Joined: Feb 2015
Reputation: 0
Post: #123
That did the trick, thanks a bunch!

*yup works in free as well :-)
(This post was last modified: 2015-02-19 21:15 by bleekselderij.)
find quote
Lightning Offline
Junior Member
Posts: 2
Joined: Nov 2014
Reputation: 0
Post: #124
I'm trying to use the addon under xbian and get the following in the logs

22:36:23 T:3034165248 ERROR: CCurlFile::Stat - Failed: HTTP response code said error(22) for http://pub7.di.fm:80/di_chillout_aacplus
22:36:23 T:3034165248 ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 400
22:36:23 T:3034165248 NOTICE: CCurlFile::FillBuffer - Reconnect, (re)try 1
22:36:23 T:3034165248 ERROR: CCurlFile::FillBuffer - Failed: HTTP returned error 400
22:36:23 T:3034165248 ERROR: CCurlFile::CReadState::Connect, didn't get any data from stream.

Any ideas? I already did the fix mentioned above for the channels. It use to play fine but something stopped working. I also tried with my premium account but get the same result in the logs.
find quote
woZa Offline
Junior Member
Posts: 3
Joined: Nov 2009
Reputation: 0
Post: #125
@warum

Thanks - that works fine...
find quote
eddedrukker Offline
Junior Member
Posts: 4
Joined: Jan 2015
Reputation: 0
Location: Netherlands
Post: #126
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,
Thanks
(This post was last modified: 2015-02-21 09:59 by eddedrukker.)
find quote
gschmidt Offline
Junior Member
Posts: 2
Joined: Feb 2015
Reputation: 0
Post: #127
(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.

I have a Rpi2 with openelec 5.0.3 installed controlled with Yatze
Last version of DI worked, however I noticed that Yatze disconnects Kodi/Openelec each time I run DI and connects when I closed DI.
So I read this post and modified/add your rows to default.py
However after I restarted the rpi2, I a got a DI script error, so I uninstalled DI, restarted the rpi2 and installed the orininal DI version again.
But now I also get a script error on the original DI...I tried also with force refresh cache

Any idea how come?
(This post was last modified: 2015-02-21 16:38 by gschmidt.)
find quote
fastleo63 Offline
Junior Member
Posts: 21
Joined: Mar 2014
Reputation: 0
Location: Ferrara, Italy
Post: #128
(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,
Thanks
Me, too. I modified default.py, but no avail: same script error. Maybe it works only on premium subscriptions...
But, could someone could post the entire default.py file?

Motherboard: ASRock FM2A88X-ITX+ - FCH: AMD A88X "Bolton-D4" | APU: AMD "Kaveri" A8-7600 with Radeon R7 graphics | RAM: 8GiB DDR3-2133 | SSD: mSATA Samsung 840 EVO 120GB | HDD: 5 x 500GB 2.5" Hitachi Travelstar (two-way mirror) | DVB-T Tuner: AVerMedia AVerTV Volar HD PRO | O.S.: MS-Windows 8.1 Pro x64 with Media Center
(This post was last modified: 2015-02-21 20:05 by fastleo63.)
find quote
bitcrusher01 Offline
Member
Posts: 91
Joined: Jul 2011
Reputation: 5
Location: Denmark
Post: #129
As warum said, it was because of a "rogue" ) in the channel meta data.
I've now updated the regex, so it hopefully shouldn't be a problem in the future.

The updated v3.0.8 has been pushed to the repo and I've asked the Kodi staff to review it.
For those who can't wait for the update to hit mainstream, you can as always install the new version manually from the repo: https://github.com/Bitcrusher/Digitally-...BMC-plugin
find quote
syco Offline
Junior Member
Posts: 5
Joined: Feb 2015
Reputation: 0
Post: #130
Hm, shit, I changed those two lines like Warum proposed, but
that did not fix it. Now, I can not see the channels anymore.
Before that I could see the channels, at least, but not play one
of them.

Well, so I will have to wait for an automatic update. Smile Does this
happen/check after every restart of Xbian/XBMC or is there an
interval set within the addon?
(This post was last modified: 2015-02-22 14:24 by syco.)
find quote
CrazyMax Offline
Junior Member
Posts: 1
Joined: Feb 2015
Reputation: 0
Post: #131
Hi!

I've got a script failed error since several weeks and i cannot load DI.fm on Kodi 14.0 (plugin version 3.0.7) Sad
Here are the logs :

Code:
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.p​y", line 458, in <module>
                                                MusicAddonInstance.run()
                                              File "C:\Users\Administrateur\AppData\Roaming\Kodi\addons\plugin.audio.di.fm\default.p​y", line 210, in run
                                                channelMeta = self.getChannelMetadata(html)
                                              File "C:\Users\Administrateur\AppData\Roaming\Kodi\addons\plugin.audio.di.fm\default.p​y", 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

Thanks for help!
(This post was last modified: 2015-02-22 16:02 by CrazyMax.)
find quote
syco Offline
Junior Member
Posts: 5
Joined: Feb 2015
Reputation: 0
Post: #132
Any news? Still not working here. Sad
find quote
bitcrusher01 Offline
Member
Posts: 91
Joined: Jul 2011
Reputation: 5
Location: Denmark
Post: #133
CrazyMax and syco: Has your issues been solved by the 3.0.8 update?
Have you tried going to the plugins settings and do a 'Force update' ?
(This post was last modified: Yesterday 11:11 by bitcrusher01.)
find quote
Post Reply