To keep it simple, it streams pandora radio over a shoutcast protocol, and presents a web interface to manage it.
Presenting (copyn paste from readme.txt):
** PandoraCaster v1.0 by ZZJ **
Application to serve Pandora Radio via a shoutcast-like protocol.
Provides a web interface to control various pandora functions.
Features:
* Fully supported by any media player that supports shoutcast!
* Supports "instant" station change, or two types of delayed
* Supports skipping of current OR next song
* Streams at 128kbs or 192kbs mp3 (depends on pandora one)
* Low system resource usage; no re-encoding music like shoutcast
* Supports using proxies, including SOCKS [tor]
* Instant buffering for newly connecting clients
* Fully supported under mono, and does not require an X server
* Can stream local only, over the network, or even over the internet
* Supports pandora feedback and implicit station change links
* Extensible Web interface w/ AJAX built-in, see below.
Behavior/Quirks:
Playback will be paused until a client connects, or if all connected clients are paused
Slow clients will finish their current song when overflow is reached then skip to realtime
Distribution agorithm is not quite perfect; multiple clients may overflow over time
Don't chain this with sproxy and enable turbo mode, bad things will happen.
DOES NOT SAVE MUSIC! NEVER WILL! DON'T ASK!
Requires:
.NET 2.0 or Mono
~64mb RAM, max
~300kb disk space (+log)
Any CPU
==== USAGE ====
---- ARGUMENTS --------------------------------
--[linux|wine|nossl] - disable SSL for login, neccisary for WINE/mono (mono will be detected automatically)
-h, --help - this
-l, --login - change saved login info and validate interactively, then exit
-a, --promiscuous - listen on all interfaces instead of loopback only
-p, --port [port] - sets the server's listen port
-n, --name [name] - sets server name (hostname/domain, or IP)
-d, --debug - enables debug logging
-s, --save - save settings set via cmd line (they are temporary otherwise)
By default, the caster only listens on localhost and will not allow external connections.
To change this, you can either use the command line options detailed above, or you can edit caster.conf
In the config, change LocalOnly to false, and set ServerName to a sensible value.
--OR--
Pass -n "name" -a -s to caster.exe, where name is a name that can be resolved to the current computer. an IP works as well.
The web interface is located at http://servername:port/ - nothing fancy to it.
If the status page is not automatically refreshing on song change, make sure JS is enabled and you only have one window open, as some browsers will not duplicate requests, but not return the duplicate when completed, so only one page will update. (I'm looking at you, firefox.)
==== caster.conf settings ====
An empty setting is stored as <string />, otherwise <string>value</string>
"" in the chart below means empty, not literal ""
| NAME | DEFAULT | SHORT DESC
---------------------------------------------------------------------------------------------
StationChangeMode | 2 | behavior when changing station, see below
ProxyNeedAuth | false | proxy needs authentication
ProxyType | "" | blank=off, http, socks4, socks4a, socks5
ProxyAddr | 127.0.0.1 | valid ipv4 IP addr for the proxy
ProxyPort | 8080 | proxy port
ProxyUser | "" | plaintext user
ProxyPass | "" | plaintext pass
ProxyXMLOnly | true | only use proxy for XML data
CacheSize | (256*1024) | amount downloaded before a song is queued
Username | "" | encoded user, do not mess with this
Password | "" | encoded pass, use -login to change login
CurrentStation | "" | last station ID
ListenPort | 3001 | server listen port
LocalOnly | true | only allow connections from localhost
ServerName | Dns.GetHostName() | server name, see below. domain, hostname, or ip
NoSSL | false | don't use SSL, needed on mono/wine
Debug | false | print additional debug output
ServeLocalFiles | false | serve files in LocalFilesPath
LocalFilesPath | ./www/ | directory to serve files from
MaxListeners | 32 | max # of listeners that can be connected
AnonWebControl | true | allow anyone to skip and rate songs
NoWebStyle | false | don't use the embedded stylesheet
LowMem | false | use disk backing for song data
Notes:
StationChangeMode
0 = play this song and the next song, station changes after that
1 = skip next song, if possible, new song will be of the new station
2 = skip this song and next song (change to new station "immediately")
ServerName
needs to be a domain, ip, or hostname
which the listenport connects to _this_ system
unimportant if in localhost only mode.
AnonWebControl
On by default, when disabled, to perform any actions that affect the broadcast you must log in using the same password used to log in to pandora.
==== Web interface ====
If AnonWebControl is false, you need to log in prior to using web interface functions like skip, song ratings, station changing, etc.
The web interface's extensibility is enabled by default. To disable, set ServeLocalFiles to false.
The path served is set via LocalFilesPath.
File starting with . will not be served, or .., though relative paths are supported within a url (http://server/dir/../otherdir/file.ext)
Edit LocalFilesPath/.links to add new navigation links.
If a file's name matches a built in URL, the built in page will be overridden.
Create a file named index.htm (or html) to replace the status page (/).
If you have a file with extension html, htm, txt, xml, or css in the dat file, a few variables will be replaced when it is displayed:
%statusjson% -> json formatted status (same as /status request)
%stationsjson% -> json formatted stations (same as /stations request)
%listenport% -> server listen port
%servername% -> server name
%serverurl% -> full server url (http://servername:serverip/)
%nowplaying% -> now playing song (artist - title)
%station% -> current station
%style% -> embedded stylesheet
%authenticated% -> is current requestor authenticated? (true | false)
%header% -> standard header with nav
%footer% -> standard footer
Built-in paths:
/; | serves audio stream (shoutcast emulation requirement)
/listen | serves audio stream
/listen/id | attempts to change station to ID and serves audio stream
/station/id | sets station to ID
/lovecurrent | loves the now playing song
/hatecurrent | hates the now playing song
/skip | skips the now playing song
/skipnext | skips the next song
/listeners | table of listeners and various info for debugging
/listeners/ar | auto-refresh listeners page
/newstation | new station ajax page
/history | returns song history
/historyjson | returns song history as a json object
/status | returns a JSON object with various now playing info
/stations | returns a JSON object with stations
/changestations | page to change stations for non-js browsers
/nextsong | returns the next song artist-title. blocks until next song ready.
/7.html | now playing in shoutcast's 7.html format
/nowplaying | returns now playing song's artist-title
/autocomplete/query | queries pandora's autocomplete server
/loadsharedstation/sid | loads a shared station from sid and changes to it (returns 0|1)
/createstation/id | trie creates a new station from ID and switches to it (returns 0|1)
/createstation/id/redir | tries to create a station then redirects to status page
/songchanged | blocks until song changes, then returns status
/blank.png | 1 x 1px transparent png
/listen.m3u | returns listen playlist in m3u format
/listen.pls | returns listen playlist in pls format
/favicon.ico | returns (static) favicon
/setstationchgmode/0-2 | sets station change mode (0-2, see above for details)
/clearmaxdata | clear each listener's maxdata variable (for listeners page)
Most of the actions like skip return a 302 redirect back to the status page.
==== WARRANTY (or lack therof) ====
No function is implied or in any way guaranteed. Try not to hurt yourself.
==== THANKS ====
pegasus, from IRC: giving me the intial idea and helping with the broadcast "algorithm"
NAudio project: for the Id3v2Tag code and some random mp3 reading bits
lizthethegray, lassiter, promyloph, and the rest of #saver2: getting pandora's new keys
==== MISC ====
Just shy of 5k lines of source. Pretty much the culmination of SProxy and the Pandora client, go go code reuse! Plus bits from saver2, and other utilities I wrote.
Not open source atm, and honestly not likely to become so without VERY good reason.
----------------------------------------------------------------
*** Pandora is a registered trademark of Pandora Media, Inc. ***
----------------------------------------------------------------
Edited by ZigZagJoe, 09 October 2010 - 07:48 PM.













