[RELEASE] Rdio Music Addon

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ampedandwired Offline
Senior Member
Posts: 107
Joined: May 2012
Reputation: 8
Post: #81
Hey all, sorry about the problems, been a bit busy lately but I'll have a look into it real soon.
find quote
Varming Offline
Junior Member
Posts: 48
Joined: Nov 2009
Reputation: 0
Post: #82
Looking forward to it - this plugin is really the only missing link I got left on my XBMC setup now Smile

[Image: widget]
find quote
dkplayaclub Offline
Senior Member
Posts: 280
Joined: Jan 2011
Reputation: 0
Post: #83
+1 - Between this and Pandora I think all my music needs for XBMC are covered.
find quote
ampedandwired Offline
Senior Member
Posts: 107
Joined: May 2012
Reputation: 8
Post: #84
Hi all, unfortunately it looks like Rdio have changed the way their rtmp streams work again Sad It's gonna take a bit of time to figure it out, hopefully will have time to look this weekend. Sorry for the inconvenience!
find quote
Varming Offline
Junior Member
Posts: 48
Joined: Nov 2009
Reputation: 0
Post: #85
Crossing my fingers as I luuuuuv my Rdio account, am just missing it at XBMC.

[Image: widget]
find quote
dkplayaclub Offline
Senior Member
Posts: 280
Joined: Jan 2011
Reputation: 0
Post: #86
Any news?
find quote
ampedandwired Offline
Senior Member
Posts: 107
Joined: May 2012
Reputation: 8
Post: #87
Hey all, unfortunately still not looking good at this stage.

Like most music streaming sites, Rdio uses flash to stream their music. They have a little flash player that communicates with their server to get the playback info (eg: URL to stream from), then it streams the music using RTMP. The XBMC Rdio plugin effectively simulates this flash player, first asking the server for the playback info then telling XBMC where the RTMP stream is.

However, it seems Rdio are making a concerted effort to prevent people using these RTMP streams outside of their own flash player. For example, when this plugin broke a few weeks ago, it was because they had introduced a "secret key" that was calculated in the flash player from some magic constants. I managed to figure that one out, but this new measure looks a bit trickier. It seems they're now generating a token on the server side and using that to somehow validate the stream, and I think that is what's causing the XMBC playback to fail (I haven't worked out the exact mechanics yet).

Don't give up hope though, I'm still working on it (I miss my Rdio on XBMC too!). The long term solution is probably to use their HTML5 streaming API, but this has not yet been released to the general public unfortunately.
find quote
dkplayaclub Offline
Senior Member
Posts: 280
Joined: Jan 2011
Reputation: 0
Post: #88
Thanks for the update ampedandwired. We all appreciate your efforts and understand the associated difficulties. If there's anything we can do to help out in the process, please let us know.

Seems like they want people to develop apps using Rdio, but want it to be difficult.
(This post was last modified: 2012-08-07 16:43 by dkplayaclub.)
find quote
danmarwas Offline
Junior Member
Posts: 3
Joined: Jul 2012
Reputation: 1
Post: #89
(2012-08-07 01:22)ampedandwired Wrote:  Hey all, unfortunately still not looking good at this stage.

Like most music streaming sites, Rdio uses flash to stream their music. They have a little flash player that communicates with their server to get the playback info (eg: URL to stream from), then it streams the music using RTMP. The XBMC Rdio plugin effectively simulates this flash player, first asking the server for the playback info then telling XBMC where the RTMP stream is.

However, it seems Rdio are making a concerted effort to prevent people using these RTMP streams outside of their own flash player. For example, when this plugin broke a few weeks ago, it was because they had introduced a "secret key" that was calculated in the flash player from some magic constants. I managed to figure that one out, but this new measure looks a bit trickier. It seems they're now generating a token on the server side and using that to somehow validate the stream, and I think that is what's causing the XMBC playback to fail (I haven't worked out the exact mechanics yet).

Don't give up hope though, I'm still working on it (I miss my Rdio on XBMC too!). The long term solution is probably to use their HTML5 streaming API, but this has not yet been released to the general public unfortunately.

Hi,
I think I have been able to make this plugin runs again.

in rdioxbmc.py you need create the amf client with a cookie:

Code:
def resolve_playback_url(self, key):
    svc = RemotingService(self._AMF_ENDPOINT)
    
    svc.addHTTPHeader('Cookie', 'r=LONGSTRING.................................................')
    svc.addHTTPHeader('Host', 'www.rdio.com')

    rdio_svc = svc.getService('rdio'

For testing, you can obtain the "r" cookie from your navigator when visit rdio.com.

Please, test if it works for you. Then, you should modify your plugin to obtain this cookie automatically. Maybe when user authenticate/reauthenticate.

There are other improvements like adding swfUrl and swfVfy keys to rtmp_info or addind user_agent and referer when calling RemotingService() but not required at this point.

Regards.
(This post was last modified: 2012-08-08 12:17 by danmarwas.)
find quote
dkplayaclub Offline
Senior Member
Posts: 280
Joined: Jan 2011
Reputation: 0
Post: #90
I am not sure im doing it right but I am gonna try this. Can I paste that basically anywhere in the rdioxbmc.py file?
find quote
Post Reply