14 Components.utils.import(
"resource://app/jsmodules/URLUtils.jsm");
33 var ShoutcastRadio = {
36 getListenURL :
function(aId) {
41 getListURL :
function(aGenre) {
52 _parseStationListFromXML :
function(aXml, aGenre) {
58 var entries = aXml.getElementsByTagName(
"station");
59 for (var
i = 0;
i < entries.length;
i++){
63 id : ent.getAttribute(
"id"),
65 genre : aGenre ? aGenre : ent.getAttribute(
"genre").split(
" ")[0],
66 bitrate : ent.getAttribute(
"br"),
67 numListeners : ent.getAttribute(
"lc"),
68 currentTrack : ent.getAttribute(
"ct"),
70 name : ent.getAttribute(
"name").split(
" - a SHOUTcast.com member station")[0]
77 getStationList :
function(aGenre) {
78 var req =
new XMLHttpRequest();
80 if (aGenre ==
"sbITop")
83 this.getListURL(aGenre),
false);
88 stationList = this._parseStationListFromXML(req.responseXML, aGenre);
const SB_SHOUTCAST_APIURL
const SB_SHOUTCAST_APITOP500
const SB_SHOUTCAST_APIPARAMS
const SB_SHOUTCAST_APIGENRE
const SB_SHOUTCAST_TUNEURL
_getSelectedPageStyle s i
const SB_SHOUTCAST_APIKEY