Digitally Imported XBMC plugin v1.0

Posted by | Posted in Python, Ubuntu, XBMC | Posted on 04-01-2012

UPDATE: Version 1.1.1 of  the Digitally Imported XBMC plugin has been released

I had holiday between Christmas and New Years, and pulled myself together and finshed up the Digitally Imported streaming music plugin for XBMC, finally hitting version 1.0.

This was actually quite lucky I had started work on it again as XBMC 11.0 Eden: Beta got release – which works great – and as Digitally Imported changed their website design at New Years, meaning: the plugin broke.

Version 1.0 means I’ve implemented all the functionality I originally set out to do:

  • Streaming of 96k public streams
  • The option to choose A-Z sorting or let the streams be displayed in the order they are at di.fm
  • A configurable cache function of stream URLs, for faster loading of the streamlist when using cached version + to not hammer DIs webserver (6 hours cache by default)
  • Unique channel icons for every channel – thank you to Ari Shohat from Digitally Imported for permission to use them
  • Premium login and premium streams
  • Premium users have the option to choose between 256k and 128k streams
  • Premium users may choose to use their ‘My Favorites’ playlist, only showing the streams they want

Download Digitally Imported XBMC plugin v1.0

What you need to do:

  • Make sure you have at least XBMC 10.1 – codename Dharma (XBMC 10.0 should work too)
  • Download Digitally Imported XBMC plugin v1.0
  • Unpack the archive, inside the archive is a folder called plugin.audio.di.fm, move it to one of the following locations, depending on your OS. Some unpacking programs extracts to a folder with the same name as the file it extracted from, meaning you could end up with a plugin.audio.di.fm folder within the plugin.audio.di.fm folder – Inception style – and that could screw things up.
    • Linux/Ubuntu – ~/.xbmc/addons/
    • Windows – C:\Users\<your_username>\AppData\Roaming\XBMC\addons\
    • OS X – ~/Library/Application Support/XBMC/addons/
  • From XBMC, the plugin is configured by left clicking or pressing C on the Digitally Imported folder in the music add-ons category and choosing Add-on settings.

Comments posted (20))

  1. Hello

    i´m from Germany. I´m a great fan from your plugin for DI-FM. I´ve a question, can you fit this plugin for sky.fm? When you like i can help you, to collect the icons, but i don´t have any experience with phyton, but i can make changes in the file.

    Thanks a lot
    Rene

  2. Hi Rene

    I have already looked at sky.fm, but the structure is a bit different from di.fm, so I’ll have to change some of the routines that get the streams.
    About the icons, I thank you for the thought, but I’m thinking about making the plugin (di.fm) download all/new icons automatically in future updates, and this would of course spill over into the (possibly future) sky.fm plugin.
    I hope you’ll settle for the di.fm plugin till then – even though it’s a bit different genre compared to sky.fm ;)

    To sum it up: Yes, I’d like to do a sky.fm plugin, but I have no idea when I’d get around to it.

    Enjoy your sunday :)
    /Tim

  3. yeeaahhaa!!!

    Great job, Bitcrusher!
    it runs first class, works with Win7 32Bit, XBMC 10.1 on a MiniPC (Xtreamer)
    Is there any possibility to donate you somethings or any other little complacency?

    Thanx my hero of the week!
    Best regards from switzerland

  4. Glad you enjoy it :)
    I’ve added a donate button on the left of the site – your not the first one asking how to donate, but now I’ve put up a PayPal donate button to try it out – though I’m feeling a bit weird about it :-/

    Anyway, about the plugin, I have some future plans for it:
    - Possible support for AAC+ streams
    - Auto-download of coverart – which would be especially beneficial when they add new channels – right now it just defaults back to the DI icon I made for the plugin.
    - An update notification system for when I release – yup, you guessed it – updates ;)

    Best regards back from Denmark

  5. Awesome plugin. Just what I have been looking for. :-)

  6. Dear Bitcrusher

    you are a richt men now :) i think it is enough for many sleepless night wiht a lot of coffe and other good stoff!

    About the plugin, your future plans are great. that is very useful.
    But i have also a few suggestions… But fist: I use the XBMC whit the remotesolution “Constellation” from FSS SP. z o.o. on my iPad. (also an great Software or App)

    Now, have you any idea to become the radiostation’s from DI.FM to them, for start/stop and stadion chance? Or is that not possible, while constallation your plugin not supports?

    And, it is a bit awkward when i whant to record a radioshow to listen them after on a mobile device. Then i must stop the xbmc (the DI.FM premium account will free after this step) and i have to start the Winamp or something whit a recorder-plugin. is there any possibility?

    anyway – thx and I wish you a good sleep to night for a powerful start in the new week
    Best regards
    N69

  7. Hey N69

    Thank you very much for the caffeine – it’s quite overwhelming and very weird (but in a good way) to recieve a donation – so thank you, I’ll make that it goes to caffeine to improve the XBMC plugin ;)

    About Constellation, I’ll write the authors about what it takes to make sure my DI.fm plugin works with their remote control.

    About recording: To my knowledge, you are not limited to only stream from one machine at a time – I’ve streamed DI both from my XBMC media center, my workstation and Android tablet at the same time, without a problem – in my mind, it’s also perfectly fair use, to stream to as many of your own machines.

    But have you had problems streaming to multiple machines, or haven’t you dared/tried because your afraid of being banned/blocked from Di.fm?

    If you have any doubt though, I suggest you send their support a mail at http://www.di.fm/contact, they usually respond within 12-24 hours, and are great guys :)

    But to return to the original question: If I could somehow make it less of a hassle to record the stream – No, I have no idea how I would handle that inside XBMC, and I haven’t found anything in the API that suggests the option to record.
    I don’t know if your using multiple machines, or of you have one machines that runs both your XBMC and WinAmp.
    If your using one machine for it all, how about alt+tabbing out and start WinAmp, turn down the volume and let it record while XBMC has the volume up?
    If your using two machines, same procedure with WinAmp – again, there should be no problem with streaming to multiple machines simultaneously.

    Hope that gives you some ideas.
    Again, thank you very much :)

  8. I can’t tell you how awesome it is having my DI.FM premium channels now available on my XBMC with a slick interface, and on top of that Milkdrop visualizations. Thank you SO MUCH!!!

  9. Hey Bitcrusher
    nothing is weird :) you deserve it, enjoy it! You are wellcmomme!

    About questions: The integration to “Constellation” would be fabulous! When I can help you something, let me now. That is one of the last step to have a complete remote to controll all my favorite media-streams.

    The approche with the winamp and the second stream from DI.FM simultaneously is a good idea. I have do something wrong at last time whit this. It works now!

    Also again, I have to say: thank you! let’s rock!
    I will think on you some evenings each time when i start XBMC with DI.FM PREMIUM :D

    Hope see or better hear you soon
    Best regards!

  10. Hi Neutron69ch

    I wrote to FSS.cc support mail last Sunday, and after not getting a response from them after 4 days, I tried writing a message to one of their guys who’s registered on the XBMC forum – hoping for better luck.
    In short: I’m no further with Constellation support – Can you think of other plugins/addons that has Constellation support? Except for the YouTube addon.

    Just thought I’d give you an update on the situation.
    Have an awesome weekend :)

  11. Realy great job. I love this plugin so much. The only feature i miss is playback of the AAC+ streams with about 40k. They save bandwith and sound better than mp3 with 96k !!
    After that you should add this plugin to the official xbmc repository and watch donations coming in :)

  12. Hey SpaceAce
    I started working on AAC+ playback, and everything but the actual playback is working.
    I’m having trouble “telling” XBMC that it’s an AAC stream.
    When I first tried to play it, the log said it seemed to be a corrupt MP3 stream – this was fixed by changing the mimetype.
    Now I just have to tell the DVDPlayer to start the stream – and we should be in the clear.

  13. Having an issue with the 128k streams for some reason. They worked when I first installed the plugin, but now they don’t. Tried deleting the plugin and reinstalling, same issue.

    xbmc.log file gives one of two possible errors, and it’s not consistent. Sometimes it doesn’t even give an error.

    02:56:16 T:6664 ERROR: MP3Codec: Unable to determine file format of http://72.26.204.32:80/techhouse?5ba31a51cbd95d1 (corrupt start of mp3?)
    02:56:16 T:6664 ERROR: CAudioDecoder: Unable to Init Codec while loading file http://72.26.204.32:80/techhouse?5ba31a51cbd95d1
    02:56:16 T:6664 ERROR: Playlist Player: skipping unplayable item: 34, path [http://72.26.204.32:80/techhouse?5ba31a51cbd95d1]

    and the following:

    02:54:27 T:6664 ERROR: CWin32WASAPI::Initialize: Audio format not supported by the WASAPI device. Channels: 2, Rate: 11025, Bits/sample: 16.
    02:54:27 T:6664 ERROR: CWin32WASAPI::Initialize: WASAPI initialization failed.

    Not sure if it’s a problem on my end that can be fixed, but i’ve tried all that I can think of. I’ve deleted my settings and used free streams, and i’ve increased my bitrate to 256, both work… but when I use 128k/bit, it won’t.

  14. In short, only 256k Premium and 96k Public streams currently works.

    I became aware of this issue last week and promptly wrote to Digitally Imported’s support.
    It turns out that the 128k MP3 has been phased out, and the stream is actually an AAC one one – even though it still says MP3.
    They said it was “mislabelled” now and won’t return.

    I’m gonna look into fixing the plugin soon (maybe during the weekend), hopefully adding support for AAC streams and everything will be good again.

  15. hi there, execllent add-on but i cannot get premium to work, configured with username and pw, but still using public with adevrts and under 40kbps…. any help how to get it to accept loginm thx

  16. Hi Ben

    Are you sure you enabled “Force cache refresh (use when changing settings)” in the addons settings, after you typed in your DI Premium credentials?

  17. Thank you all working now :)

  18. Hi there,

    I also face some problems with DI premium. It seems to work as I don’t get adverts, but I can’t enable 256kbit/s stream. Maximum 128, change log states that 256 is possible. Any ideas how to enable it ?

  19. 256k was available in MP3 format in v1.0, but was removed in “favour” of AAC+ as the 128k MP3 stream was switched to AAC+.
    With MP3 there is only 256k available, and to make the addon both more customizable and take consideration for people who has to pay per gigabyte they download or has low bandwidth, I chose to go with AAC+ that goes as low as 40k/sec.
    I will add MP3 again, as a fourth option for quality, and theres some other things I’d like to do to the plugin as well.

  20. Comments on this post has been closed and moved to the post on v1.1.1 here: http://qualisoft.dk/2012/04/digitally-imported-addon-v1-1-1-in-the-official-xbmc-eden-music-addon-repository/