[RELEASE] Digitally Imported XBMC addon (Updated 25th March 2015 : V3.1.0)

  Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
pbuchi2000 Offline
Junior Member
Posts: 1
Joined: Mar 2015
Reputation: 0
Post: #136
I have the same problem with 3.0.8, script failed.

NOTICE: -->Python Interpreter Initialized<--
13:47:04 T:1216 NOTICE: [PLUGIN] Digitally Imported v3.0.8 (21. February 2015)
13:47:08 T:1216 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\Paddy\AppData\Roaming\XBMC\addons\plugin.audio.di.fm\default.py", line 459, in <module>
MusicAddonInstance.run()
File "C:\Users\Paddy\AppData\Roaming\XBMC\addons\plugin.audio.di.fm\default.py", line 165, in run
channelMeta = self.getChannelMetadata(html)
File "C:\Users\Paddy\AppData\Roaming\XBMC\addons\plugin.audio.di.fm\default.py", line 273, in getChannelMetadata
channelMeta = re_channelMeta.findall(html)[0]
IndexError: list index out of range
-->End of Python script error report<--
13:47:08 T:3708 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.audio.di.fm/
13:47:08 T:3708 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.di.fm/) failed
find quote
dparring Offline
Junior Member
Posts: 1
Joined: Mar 2015
Reputation: 0
Post: #137
In default.py, change line 273 to this:

Code:
re_channelMeta = re.compile(r"di.app.start\(({.+\"channels\":\s*.+(?!\}\)))\)", re.M | re.I)

Bascially you're adding ".+" after the "{". That will fix it for now. DI is sending a version field in the JSON that's breaking the regex in 3.0.8
find quote
syco Offline
Junior Member
Posts: 12
Joined: Feb 2015
Reputation: 0
Post: #138
(2015-03-08 00:31)dparring Wrote:  In default.py, change line 273 to this:

Code:
re_channelMeta = re.compile(r"di.app.start\(({.+\"channels\":\s*.+(?!\}\)))\)", re.M | re.I)

Bascially you're adding ".+" after the "{". That will fix it for now. DI is sending a version field in the JSON that's breaking the regex in 3.0.8

Thanks, mate, it is working now. =)
find quote
bitcrusher01 Offline
Member
Posts: 96
Joined: Jul 2011
Reputation: 5
Location: Denmark
Post: #139
I've just pushed v3.0.9 to the Kodi plugin admins Smile
The channelmeta JSON had been changed, so it didn't start with the "channels" key anymore. The regex is now as generic as possible and they (DI) should be able to add as much as they want, without breaking the plugin (again!), as long as they don't change the whole structure of it.
(This post was last modified: 2015-03-09 01:03 by bitcrusher01.)
find quote
syco Offline
Junior Member
Posts: 12
Joined: Feb 2015
Reputation: 0
Post: #140
Great! Generic is awesome. Thanks, mate. =)

Btw, one of the best plugins so far, because I
am listening to my electronic music about 90%
at DI. Wink
(This post was last modified: 2015-03-09 10:18 by syco.)
find quote
bitcrusher01 Offline
Member
Posts: 96
Joined: Jul 2011
Reputation: 5
Location: Denmark
Post: #141
Syco: Glad to hear it Smile
find quote
Martijn Offline
Team Kodi
Posts: 13,065
Joined: Jul 2011
Reputation: 181
Location: Dawn of time
Post: #142
(2015-03-09 22:59)bitcrusher01 Wrote:  Syco: Glad to hear it Smile

Ever tried to contact them about getting an official API so stuff doesn't break all the time on a website change?

Do NOT e-mail Team-Kodi members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first
find quote
bitcrusher01 Offline
Member
Posts: 96
Joined: Jul 2011
Reputation: 5
Location: Denmark
Post: #143
Martijn: Yes I have, back when I was about to start making v1 of the plugin (2010-ish) I was actually writing back and forth with them about excatly access to their, then, beta API.
But it took longer and longer for them to respond, they said that I maybe could get access to their API, but they were still writing documentation for it.

I then held off on coding anything, because I thought I'd get access to the API, so there was no idea in starting to scrape their site.

After not hearing from the for some time, I wrote them again and got the message back that now they basicly didn't want "outsiders", using their API.
I think to use their API though, that you'd need an account, even to get their free channel listings, which I think would be a hassle for most users, but I honestly haven't investigated it further - it's only based on my experience with their mobile app.

Since then though, some guys have documented most of their API, so maybe for v4 some day Wink
find quote
Martijn Offline
Team Kodi
Posts: 13,065
Joined: Jul 2011
Reputation: 181
Location: Dawn of time
Post: #144
You've got mail Wink
Haven't looked in detail

Do NOT e-mail Team-Kodi members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first
find quote
syco Offline
Junior Member
Posts: 12
Joined: Feb 2015
Reputation: 0
Post: #145
(2015-03-09 23:31)bitcrusher01 Wrote:  Martijn: Yes I have, back when I was about to start making v1 of the plugin (2010-ish) I was actually writing back and forth with them about excatly access to their, then, beta API.
But it took longer and longer for them to respond, they said that I maybe could get access to their API, but they were still writing documentation for it.

I then held off on coding anything, because I thought I'd get access to the API, so there was no idea in starting to scrape their site.

After not hearing from the for some time, I wrote them again and got the message back that now they basicly didn't want "outsiders", using their API.
I think to use their API though, that you'd need an account, even to get their free channel listings, which I think would be a hassle for most users, but I honestly haven't investigated it further - it's only based on my experience with their mobile app.

Since then though, some guys have documented most of their API, so maybe for v4 some day Wink

The last part sounds awesome. Smile
find quote
bitcrusher01 Offline
Member
Posts: 96
Joined: Jul 2011
Reputation: 5
Location: Denmark
Post: #146
Just submitted v3.1.0 that fixes an issue for premium members using their favorites channellist
(This post was last modified: 2015-03-25 03:40 by bitcrusher01.)
find quote
moonman Offline
Junior Member
Posts: 2
Joined: Nov 2013
Reputation: 0
Post: #147
Is there any workaround for Canadian users? All I hear is that streaming is only supported through di.fm website or official apps. I would think if a user could sign in (as a free user) that would fix the problem.
find quote
bitcrusher01 Offline
Member
Posts: 96
Joined: Jul 2011
Reputation: 5
Location: Denmark
Post: #148
I'm sorry, I honestly don't know as I've never experienced the "error" before - I know people in the UK are bothered by it as well.
find quote
Post Reply