Help - Search - Members - Calendar
Full Version: Pandora
Scenyx Entertainment Community > Xbox1 Forums > Software Forums > XBMC for Xbox Forums > XBMC Python Scripting Forum
cashkid
Oh If I only knew python, I would. Yes I would.
Pandora.
I got to learn it now for this. ohmy.gif

mike315
QUOTE(cashkid @ Feb 13 2006, 03:31 AM) *

Oh If I only knew python, I would. Yes I would.
Pandora.
I got to learn it now for this. ohmy.gif



eh not sure it would be possible...it uses a flash player:

https://www.pandora.com:443/radio/tuner_6_7_0_1.swf

There doesn't seem to be a magical way to extract the actually stream url...and there's no telling what type of stream it is........perhaps someone can decompile it and see whats up. dont hold your breath.

EDIT:

Nevermind what I typed above...check this out: http://blogs.securiteam.com/index.php/archives/174

& http://www.digg.com/music/Pandora_streamin...ur_TEMP_folder_

Looks like you can build your Music collection offa this site...not that I condone piracy lol...
DigiGuru
So, it would appear, looking at the blogs, what we need is the following:

The flash player for XMBC (it doesn't play audio, but that theoretically doesn't matter)
The ability to intercept the headers
Download/Cache the MP3 file from the header
As soon as the next request comes in, cache that and queue it for download too.
Keep adding these files to a growing playlist

In order to keep up with a form of privacy or to not invalidate Pandora's licensing, the script could "flush" the cache on close.

The only problem is that the MP3 streams that are downloaded DONT contain any ID3 information, so someone would need to find a way to extract the text from the flash file

Stu
raid517
I really hope someone picks up on this idea.

GJ
effinboy
So do I, I listen to this website... DAILY. biggrin.gif
vulgusprofanum
i'm not really familiar with pandora, but assume it's about the same as last.fm. (which is awsome) so ... that's already partially supported by xbmc, (submitting listned songs to database) but no support for last.fm radio. the radio is great (quality and function) and it's open source. so, anyway, someone should integrate this into xbmc for a great "learning" web-radio. should be easier than dealing with that flash crap.
raid517
Hell yeah if I was given a choice, I would always choose lastFM first. I was under the impression that XBMC had full lastFM support? I thought it was the radio? Hell I even bough a modchip when I heard it.

We definitely need either LastFM support, or Pandora support, or both for the Xbox. There are guys paying hundreds and hundreds of dollars for Sonos type Internet radio players. The Xbox should be more than capable of handling this and would make an awesome LastFM hardware based radio player.

GJ
gregers
QUOTE(DigiGuru @ Feb 21 2006, 05:08 PM) *
The flash player for XMBC (it doesn't play audio, but that theoretically doesn't matter)

rewrite flash client in python instead (haven't checked what possibilities you have with python on XBMC, but I suppose it should work)

QUOTE(DigiGuru @ Feb 21 2006, 05:08 PM) *
The ability to intercept the headers

just download the xml (see below)

QUOTE(DigiGuru @ Feb 21 2006, 05:08 PM) *
Download/Cache the MP3 file from the header

you'll find a link to the mp3 file in the xml

QUOTE(DigiGuru @ Feb 21 2006, 05:08 PM) *
As soon as the next request comes in, cache that and queue it for download too.

In the HTTP protocol, only the client sends requests. The xml file contains a list of songs, including one (or more) ahead of the one you're listening too. When at the end of a song, start playing the next (already downloaded), then download the xml again to get the url for the following song.

QUOTE(DigiGuru @ Feb 21 2006, 05:08 PM) *
The only problem is that the MP3 streams that are downloaded DONT contain any ID3 information, so someone would need to find a way to extract the text from the flash file

The data is in the xml wink.gif


I've been thinking about making this for a while, but unfortunately I don't have the time. I think it is easier than you think. If you use a packet sniffer (or LiveHttpHeader for Firefox) you can se how the Pandora flash client interacts with the server. It's just regular HTTP protocol. You will see that the client requests an xml file from the server. This contains a list of song data, including what you are missing in the ID3 (artist, album title, song title, category) as well as link to amazon, itunes, music.com, album cover image, and link to the mp3 file.

If I were to make a plugin for XBMC, I would make my own GUI that communicates with the pandora server in the same way as the flash client does. This way we don't need a XBMC flash player

It's probably a good idea to contact Pandora, asking them what they require to have a friendly relationship with them.

Haven't really looked into the validation, but I might be able to help if someone wants to make an XBMC plugin...
timdog82001
Holy crap. Somebody PLEASE make a script for this, this is insanely cool, and would be a HUGE addition to xbmc. I wish I could do it, but unfortunately I don't know the first thing about python.
wassabi
Not sure if this helps, but they have a thing for winamp.
http://googlesystem.blogspot.com/2006/05/l...-in-winamp.html

CODE
If you have the latest version of Winamp (namely, 5.21), you can add Pandora, a great online personalized radio, to Media Library.

Close Winamp, open
C:\Program Files\ Winamp\Plugins\ml \ml_online.ini (change the location if you've installed Winamp elsewhere).

Replace this line

ElementID7=-1

with

ElementID7=7000
ElementIcon7=11003
ElementSubbed7=1
ElementName7=Pandora
ElementURL7=http://www.pandora.com/?cmd=tunermini
ElementID8=-1

When you open Winamp again, go to Media Library/Online Services/Pandora. If you haven't got an account, you should make one. You can close Media Library and still listen to your radio.
mike315
QUOTE(wassabi @ May 12 2006, 02:17 PM) *

Not sure if this helps, but they have a thing for winamp.
http://googlesystem.blogspot.com/2006/05/l...-in-winamp.html


doesnt help too much unfortunately...the media library window in winamp can be used for an embedded IE webpage. and thats all thats really going on there, just another IE window running the pandora flash player.

sad.gif
Ph33r_Bob
i decompiled the tuner.

download here

http://rapidshare.de/files/23068604/tuner_7_0_0_0.rar.html
Meschke
yeah, i definatly agree this would be a great addition to xbmc

if someones gets this goin i'll help alpha, or beta test:)
morde
Any progress on a pandora plugin?
fdrzrich
I just registered at Pandora (nicked a zip code of some random US company as it only allows US codes!) and think its a great idea! Been listening to loads of songs I would never normally have heard of...

It NEEDS to be created for XBMC.....If only I knew how! Please uhh.gif
brennevin
I also tried pandora and it work's GREAT! If some wizard could do some magic and make it available on xbmc I would be very greatful too pop.gif
GameDoctor
Guess I'll have to say that we listen to Pandora in the shop here, but on a PC (gasp!). Please put me on a script waiting list... cool.gif
peskypescado
Well, I just discovered Pandora and was disappointed there was no direct way to control/listen to it via XBMC. However, I threw together a little VLC CLI magic to stream it to XBMC. You still have to control it from a PC, but at least the sound comes out of your stereo. Here is the command I use; it can be pasted into a shortcut for frequent use. It it all one command.

CODE
"C:\Program Files\VideoLAN\VLC\vlc.exe" dshow:// :dshow-vdev="none" :dshow-adev="SoundMAX HD Audio I" :dshow-size="" :sout=#transcode{acodec=vorb,ab=500,channels=2}:duplicate{dst=std{access=http,mux=ogg,dst=192.168.1.2:1234}}

Some adjustments would need to be made with VLC and your recording mixer to make it work for your PC. However, this will take the sound card input and encode it to Vorbis @ 500kbit (couldn't get FLAC/WAV to work) and listen on IP 192.168.1.2 (change to your PCs IP). Then make an .strm file (i.e. vlc.strm) on your Xbox (/xbmc/streams/ maybe?) and include the line:

CODE
http://192.168.1.2:1234

Then anytime you want to listen to what is coming out through your PC's soundcard, start VLC with the special shortcut, and select the strm file in XBMC. This will actually let you hear your protected iTunes/PlaysForsure stuff on your PC too.
Photovore
Just thought I'd throw my $.02 in here. Yes, it is XML being served off of a Jetty content server. Take a look at the XML response below... You can decode all the song info in the response headers:
(Sorry that some of the formatting looks weird... stupid tabs)

HTTP/1.0 2
OK
Date: Wed, 21 Mar 2007 18:27:01 GMT
Server: Jetty/5.1.3 (Linux/2.6.13.1-20050914 i386 java/1.5.0_09)
Content-Type: text/xml
Content-Length: 1395
Cache-Control: no-cache, no-store, must-revalidate, max-age=-1
Pragma: no-cache, no-store
Expires: -1
Connection: close

<?xml version="1.0" encoding="UTF-8"?>
<methodResponse>
<params>
<param>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>isQuickMix</name>
<value><boolean>0</boolean></value>
</member>
<member>
<name>originalStationId</name>
<value>128207432377633309</value>
</member>
<member>
<name>stationId</name>
<value>200977608757324395</value>
</member>
<member>
<name>isNew</name>
<value><boolean>0</boolean></value>
</member>
<member>
<name>initialSeed</name>
<value>
<struct>
<member>
<name>song</name>
<value>
<struct>
<member>
<name>identity</name>
<value>edcf4dc81c41e9468e0acdb622f3adb1</value>
</member>
<member>
<name>songTitle</name>
<value>StuckOn You</value>
</member>
<member>
<name>musicId</name>
<value>S48669</value>
</member>
<member>
<name>score</name>
<value></value>
</member>
<member>
<name>artistSummary</name>
<value>Lionel Richie</value>
</member>
</struct>
</value>
</member>
<member>
<name>seedId</name>
<value>166061500303084061</value>
</member>
<member>
<name>musicId</name>
<value>S48669</value>
</member>
</struct>
</value>
</member>
<member>
<name>stationIdToken</name>
<value>7433cc8bac1c9d5db5d1d919bbd200f24e1d9007046acd80</value>
</member>
<member>
<name>isCreator</name>
<value><boolean>0</boolean></value>
</member>
<member>
<name>stationName</name>
<value>Stuck On You Radio</value>
</member>
<member>
<name>originalCreatorId</name>
<value>7277085</value>
</member>
</struct>
</value>
</data>
</array>
</value>
</param>
</params>
</methodResponse>
scrupul0us
Bringing this back to life.... did anyone ever get anywhere with this?
tour93
Anyone? sad.gif
Pandora, Last.fm or MeeMix ?
tour93
Ok, I finally got it to work.
Follow that thread from Verso (thanks Verso): Streaming Last.FM, Pandora etc. to XBMC using VLC (on Windows)

But add at #5 after "Hit Refresh next to "Audio device name" and then select your sound card from the list" you need to hit "Configure" and under "Pin Line" select "Wave Out Mix" and enable.

Now it's working for me. Pandora on my xbox, yoohoo! biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.