[REL] AudioAddict (RadioTunes.com, DI.fm, etc)


#1

Hello,

I wrote a basic channel plugin for accessing AudioAddict streaming audio services:

  • RadioTunes.com (formerly Sky.fm)
  • DI.fm (aka Digitally Imported)
  • RockRadio.com
  • JazzRadio.com
  • ClassicalRadio.com

https://github.com/phrawzty/AudioAddict.bundle

The included README.md should explain everything.  If you have specific questions or feature requests, don't hesitate to let me know.

Pull requests gladly considered. :)


#2

Where is the Plex Forum post for this plugin?

https://forums.plex.tv/discussion/107801/rel-audioaddict-radiotunes-com-di-fm-etc/p1



Do I need a Premium account?

Yes. You need a Premium account in order to get the Listen Key. Without that key, all you get are the free streams, which - while technically functional - no longer have music on them (just a message on loop).



I can't play the stream and/or I get a codec error - what's the deal?

As noted above, AAC support is inconsistent across devices, browsers, and clients.The only "safe" option is to use an MP3 stream (though AAC does sometimes work).



I changed settings such as Preferred Stream in the preferences, but it didn't seem to do anything.

As noted above, any time you change a setting in preferences, you'll need to Force Refresh the service(s) you're interested in. Don't worry if it seems like it timed out the first time, and don't forget to turn this flag back off when you're done.



Does this work in Chromecast / iPad / HT / (insert whatever architecture you've got)?

Probably (see AAC vs. MP3 above, however).


#3

https://github.com/tmaher/AudioAddict.bundle/

Needs a bit more cleanup before it's ready for a PR, but I wanted to touch base before I get distracted later this week.  I've factored out the screen-scraping that was going on to get the thumbnails (/mobile/batch_update FTW), tobiass.eu's site seems to have died so did a half-ass import of the API doc from the wayback machine into API.md, and I've moved from urllib to Plex's plugin-specific caching HTTP client.  The caching client also allows for async "PreCache" requests, so that plus batch_update is a big speed boost for the UI.

The big TODOs are...

1) Make AAC work

2) Use client IP geolocation (instead of random) to pick a stream server.  Avoiding unnecessary transatlantic hops is an absolute must.

3) Figure out cache eviction strategy

4) Reign in some of the Dict['crazy']['omg']['kittens'] that I spewed out.  Sorry about that.


#4

AAC is working per https://github.com/tmaher/AudioAddict.bundle/commit/50dfe98a2ab3338a021e64509b8f96540eaaeded

The google doc linked to from https://forums.plex.tv/topic/87324-missing-from-the-official-plugin-documentation/ had the answer.  The container is (annoyingly) undocumented.  Next stop geolocation.


#5

AAC is working per https://github.com/tmaher/AudioAddict.bundle/commit/50dfe98a2ab3338a021e64509b8f96540eaaeded

The google doc linked to from https://forums.plex.tv/topic/87324-missing-from-the-official-plugin-documentation/ had the answer.  The container is (annoyingly) undocumented.  Next stop geolocation.

I've not had a chance to review the diffs in detail (yet), but based on diff stats alone it's clear that you've been busy.  As for getting AAC to work, plug-in aside, that's a big win for me personally, so thanks. :)  I'm also glad to see the webpage JSON scraper gone.  It was total jank.

I went ahead and added you as a collaborator on the original repo.  I'd be glad to reivew any PR once you're happy with it.

Thanks again!


#6

Hey mate - just curious if there's anything I can do to help out with your (hopefully impending) PR?  Let me know!


#7

Hello,

I've made some improvements to the plugin which should hopefully make the experience a little more smooth.  In particular, I'm now using the batch API endpoint instead of scraping the home pages of the services for extended channel info - this really improves the user experience, heh.

https://github.com/phrawzty/AudioAddict.bundle

@tmaher, I'm still very interested in the work that you've done, notably as regards getting AAC to work.  That said, I'm having a hard time following all the changes in your repo, which is why I didn't merge and work from there.  If there are particular elements you'd like to work on together, let me know !


#8

@phrawzty: tested your plugin, works ok but for some strange reason some channels do not play. For instance the di.fm progressive works fine, but the trance channel does nothing, player stays at 0 and then stops.

Enabled debugging server side but does not show much when I start trance (2 lines only about fetching the png), when I start a channel that does work the log shows about 10 lines (also only about fetching images so far I can see).

Any clue why this is happening? Or is there anything I can enable/check to debug the problem?


Edit: after about an hour I tried again and now it works also on the channels that didn't work before. Maybe it was some hammer protection or so, don't know.

Anyway: GREAT PLUGIN, thanks! :)


Datapoint: I'm using plex server on a synology nas, and streaming to a chromecast dongle.


Edit2: tried -aac branch now as well, streampref premium does not seem to work, tested on both chromecast and pc client. Streampref premium_high works fine.

Can't see current or previous track either, says (null) at both on the plex iOS app.

HT does not seem to work at all (unable to play media).


#9

Edit: after about an hour I tried again and now it works also on the channels that didn't work before. Maybe it was some hammer protection or so, don't know.
Anyway: GREAT PLUGIN, thanks! :)

Datapoint: I'm using plex server on a synology nas, and streaming to a chromecast dongle.

Edit2: tried -aac branch now as well, streampref premium does not seem to work, tested on both chromecast and pc client. Streampref premium_high works fine.
Can't see current or previous track either, says (null) at both on the plex iOS app.
HT does not seem to work at all (unable to play media).

Hello,

Thanks for the feedback.  You're using different platforms than I am, so it's good to have a different perspective on what works and what doesn't, heh.

  • Concerning AAC, yeah, that's a work in progress and I haven't gotten it to work yet either; any MP3-based stream will work perfectly fine.
  • For the current/previous track, I actually have code for that on the back-end, but since Plex for Samsung doesn't support in-line hooks for this functionality, I haven't found a way to use it.  It's good to know that the iOS app has this possibility; however, since I don't own an iPhone, I'm not in a position to develop for it.
  • What do you mean by "HT" ?

#10

Hello

Edit2: tried -aac branch now as well, streampref premium does not seem to work, tested on both chromecast and pc client. Streampref premium_high works fine.
 

I've made an (admitedly minor) change to the aac branch which should allow the AAC streams to play properly (see https://github.com/phrawzty/AudioAddict.bundle/issues/8).  I've tested it on Firefox for OSX and Plex for Samsung, and so far I've been able to play both high and low bitrate AAC streams on DI.fm and Sky.fm (or whatever they're calling it now).

If you could try with your platform(s) and let me know how it goes, I'd appreciate it.


#11

AAC (streampref premium) now works in Firefox Windows, and on iPad / iOS when playing the music directly on the iPad but sadly not when streaming from iPad to Chromecast, it gives error : "A Chromecast error has occurred" on both the iOS app and the screen display. I have researched a bit and found that Chromecast should support HE-AAC and LC-AAC decoding so I'm not sure why this happens. Any way I can debug this somewhere to find the problem?

About your previous reply:

- Can you give some pointers or examples on how the current track could be made visible? So I can test that code here and give you feedback?

- with HT i meant the standalone Plex version Home Theater.


#12

AAC (streampref premium) now works in Firefox Windows, and on iPad / iOS when playing the music directly on the iPad but sadly not when streaming from iPad to Chromecast, it gives error : "A Chromecast error has occurred" on both the iOS app and the screen display. I have researched a bit and found that Chromecast should support HE-AAC and LC-AAC decoding so I'm not sure why this happens. Any way I can debug this somewhere to find the problem?

I'm not sure where to begin debugging that problem, to be honest.  I've recently acquired a Chromecast, though I haven't tried to use it in conjunction with Plex yet - I'll take a look in a couple of weeks when I have some free time to work on this plug-in again.

- Can you give some pointers or examples on how the current track could be made visible? So I can test that code here and give you feedback?

The AudioAddict library has a method named "get_nowplaying" which returns the currently playing track.  Your guess is as good as mine on how to make that call useful in the iOS app. :)


#13

Is this working with Chromecast from Android? looks like Chromecast is working to some extent at least?

Also, when might this be published to the Plex Channels directory?


#14

So, it'd be nice to have dropdowns for the possible values (for preferred stream, preferred source). Or at least default to sensible values.

Anywho, haven't tested on Chromecast, but this works fine on my FireTV. Only issue for me was that Preferred Stream appears to be required (as I'd only entered my listen key initially, with no results).

As your readme notes that the preferred stream value may differ by source, it may be good to allow configuring settings per source.


#15

Is this working with Chromecast from Android? looks like Chromecast is working to some extent at least?

Also, when might this be published to the Plex Channels directory?

As I have not personally tested it, I can neither confirm nor deny Chromecast functionality.

I don't know how things get published in the channels directory, so as of right now, the timeline would be "never".  When the plugin is production-ready I'll look into that step.

So, it'd be nice to have dropdowns for the possible values (for preferred stream, preferred source). Or at least default to sensible values.

Anywho, haven't tested on Chromecast, but this works fine on my FireTV. Only issue for me was that Preferred Stream appears to be required (as I'd only entered my listen key initially, with no results).

As your readme notes that the preferred stream value may differ by source, it may be good to allow configuring settings per source.

Dropdowns in the options menu, you mean?  That seems reasonable.  I've opened an issue for it.


#16

Is this working with Chromecast from Android? looks like Chromecast is working to some extent at least?

Also, when might this be published to the Plex Channels directory?

Hello,

I've just tried streaming both AAC and MP3 channels through Plex on my Android, and both worked without any problems.  I would be interested in hearing feedback from anyone else using this Plugin along with Chromecast on Android (positive or negative).

My environment, for reference:

  • Plex Server v0.9.11.1.678-c48ffd2 on Ubuntu 14.04 LTS
  • Plex for Android v3.5.5.229-c8d58e9
  • Android 4.2.2 (HTC)
  • Chromecast app v1.8.22 (unsure if it's related, but perhaps worth noting)

#17

Hey guys,

Any ideea, can one enter a premium account login info somewhere in the bundle config files ? Because on premium it works only in browser plex player where it asks me in a popup for login, but on android / ios tablet it shows no login popup so the streaming does not work. Thanks a lot in advance!


#18

Any ideea, can one enter a premium account login info somewhere in the bundle config files ? Because on premium it works only in browser plex player where it asks me in a popup for login, but on android / ios tablet it shows no login popup so the streaming does not work. Thanks a lot in advance!

This is another quirk that I don't have a work-around for.  Currently the only way to configure this info is through the web interface, but that's more of a problem with the clients than the plug-in, since they simply don't have this feature.  You could try editing the AudioAddict.bundle/Contents/DefaultPrefs.json and inserting your desired settings as defaults before uploading it to the server.


#19

Hey,

Good idea, but sadly I don't know what properties to set and send to the server (like User="user" and Password="pass"). I would have no problem with the notion of hard-coding my premium credential inside the plugin config files since it's a server somewhat safe in my network.

Also thanks a lot for the answer, this plugin working with premium is the last step in my little project of mounting a tablet in my car dash, and to have all multimedia I use/need inside the plex is awesome because it has such a nice interface. Only thing that would make me exit plex is to open up the navigation software :) So thanks a lot for making this channel. 

Best regards


#20

Hey,

Good idea, but sadly I don't know what properties to set and send to the server (like User="user" and Password="pass"). I would have no problem with the notion of hard-coding my premium credential inside the plugin config files since it's a server somewhat safe in my network.

Also thanks a lot for the answer, this plugin working with premium is the last step in my little project of mounting a tablet in my car dash, and to have all multimedia I use/need inside the plex is awesome because it has such a nice interface. Only thing that would make me exit plex is to open up the navigation software :) So thanks a lot for making this channel. 

Best regards

Thanks for your kind words. :)  As for the settings, the README explains each of the three pertinent options in detail.  In order to hardcode them into the bundle, just edit the DefaultPrefs.json file (noted above) and populate the default key as appropriate.  Let me know if you have any specific questions.