Kodi Community Forum

Full Version: Digitally Imported XBMC addon (Updated 25. July 2016 : V3.1.2)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
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
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
(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. =)
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.
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
Syco: Glad to hear it Smile
(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?
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
You've got mail Wink
Haven't looked in detail
(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
Just submitted v3.1.0 that fixes an issue for premium members using their favorites channellist
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.
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.
It looks like for us (with the problem) the problem is solved if a stream is access with a key, just like premium users. Except of course free users have no access to premium quality streams.
This is what I see in the playlist I downloaded for all my favourite channels:
Code:
[playlist]
NumberOfEntries=12
File1=http://message-stream.audioaddict.com:80/di_canada?<key>
Title1=Digitally Imported - Big Room House
Length1=-1
File2=http://message-stream.audioaddict.com:80/di_canada?<key>
Title2=Digitally Imported - Trance
Length2=-1
File3=http://message-stream.audioaddict.com:80/di_canada?<key>
Title3=Digitally Imported - Epic Trance
Length3=-1
File4=http://message-stream.audioaddict.com:80/di_canada?<key>
Title4=Digitally Imported - Classic Trance
Length4=-1
File5=http://message-stream.audioaddict.com:80/di_canada?<key>
Title5=Digitally Imported - Goa-Psy Trance
Length5=-1
File6=http://message-stream.audioaddict.com:80/di_canada?<key>
Title6=Digitally Imported - Tech House
Length6=-1
File7=http://message-stream.audioaddict.com:80/di_canada?<key>
Title7=Digitally Imported - Deep Tech
Length7=-1
File8=http://message-stream.audioaddict.com:80/di_canada?<key>
Title8=Digitally Imported - Progressive
Length8=-1
File9=http://message-stream.audioaddict.com:80/di_canada?<key>
Title9=Digitally Imported - Hard Dance
Length9=-1
File10=http://message-stream.audioaddict.com:80/di_canada?<key>
Title10=Digitally Imported - Progressive Psy
Length10=-1
File11=http://message-stream.audioaddict.com:80/di_canada?<key>
Title11=Digitally Imported - Techno
Length11=-1
File12=http://message-stream.audioaddict.com:80/di_canada?<key>
Title12=Digitally Imported - Minimal
Length12=-1
Version=2

What is strange is that all channels are on the same server/port number. I don't understand how it differentiates between all of the different channels.It might be the title that serves as a guide as to which channel to play.

Nevermind. Thought it was playing, but it actually plays the same message "due to licensing restrictions..." ohh well. Sorry for the noise
(2015-04-12, 09:38)moonman Wrote: [ -> ]It looks like for us (with the problem) the problem is solved if a stream is access with a key, just like premium users. Except of course free users have no access to premium quality streams.
This is what I see in the playlist I downloaded for all my favourite channels:
Code:
[playlist]
NumberOfEntries=12
File1=http://message-stream.audioaddict.com:80/di_canada?<key>
Title1=Digitally Imported - Big Room House
Length1=-1
File2=http://message-stream.audioaddict.com:80/di_canada?<key>
Title2=Digitally Imported - Trance
Length2=-1
File3=http://message-stream.audioaddict.com:80/di_canada?<key>
Title3=Digitally Imported - Epic Trance
Length3=-1
File4=http://message-stream.audioaddict.com:80/di_canada?<key>
Title4=Digitally Imported - Classic Trance
Length4=-1
File5=http://message-stream.audioaddict.com:80/di_canada?<key>
Title5=Digitally Imported - Goa-Psy Trance
Length5=-1
File6=http://message-stream.audioaddict.com:80/di_canada?<key>
Title6=Digitally Imported - Tech House
Length6=-1
File7=http://message-stream.audioaddict.com:80/di_canada?<key>
Title7=Digitally Imported - Deep Tech
Length7=-1
File8=http://message-stream.audioaddict.com:80/di_canada?<key>
Title8=Digitally Imported - Progressive
Length8=-1
File9=http://message-stream.audioaddict.com:80/di_canada?<key>
Title9=Digitally Imported - Hard Dance
Length9=-1
File10=http://message-stream.audioaddict.com:80/di_canada?<key>
Title10=Digitally Imported - Progressive Psy
Length10=-1
File11=http://message-stream.audioaddict.com:80/di_canada?<key>
Title11=Digitally Imported - Techno
Length11=-1
File12=http://message-stream.audioaddict.com:80/di_canada?<key>
Title12=Digitally Imported - Minimal
Length12=-1
Version=2

What is strange is that all channels are on the same server/port number. I don't understand how it differentiates between all of the different channels.It might be the title that serves as a guide as to which channel to play.

Nevermind. Thought it was playing, but it actually plays the same message "due to licensing restrictions..." ohh well. Sorry for the noise

It is without a doubt a geo IP restriction/rule, that make di.fm server those "licensing restrictions" messages.
Out of curiosity, what happens if you actually try to play the .pls that the site normally would serve?
Below is the content of the public Progressive channels .pls, if someone could try it out from Canada/UK?
Code:
[playlist]
NumberOfEntries=7
File1=http://pub6.di.fm:80/di_progressive_aacplus
Title1=Digitally Imported - Progressive
Length1=-1
File2=http://pub4.di.fm:80/di_progressive_aacplus
Title2=Digitally Imported - Progressive
Length2=-1
File3=http://pub5.di.fm:80/di_progressive_aacplus
Title3=Digitally Imported - Progressive
Length3=-1
File4=http://pub1.di.fm:80/di_progressive_aacplus
Title4=Digitally Imported - Progressive
Length4=-1
File5=http://pub2.di.fm:80/di_progressive_aacplus
Title5=Digitally Imported - Progressive
Length5=-1
File6=http://pub8.di.fm:80/di_progressive_aacplus
Title6=Digitally Imported - Progressive
Length6=-1
File7=http://pub7.di.fm:80/di_progressive_aacplus
Title7=Digitally Imported - Progressive
Length7=-1
Version=2
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18