Merge branch 'master' of dev.sourcefabric.org:airtime

This commit is contained in:
denise 2013-05-14 16:09:22 -04:00
commit ec87a8ff88
5 changed files with 12 additions and 8 deletions

View File

@ -3,7 +3,7 @@
<input type="button" class="pl-waveform-fades-btn" value="<?php echo _("Show Waveform")?>"></input>
</dd>
<?php if ($this->item1Type == 0) {?>
<dt><? echo _("Fade out: "); ?><span class='spl_cue_hint'><? echo _("(ss.t)")?></span></dt>
<dt><?php echo _("Fade out: "); ?><span class='spl_cue_hint'><?php echo _("(ss.t)")?></span></dt>
<dd id="spl_fade_out_<?php echo $this->item1; ?>" class="spl_fade_out"
data-fadeout="<?php echo $this->item1Url; ?>"
data-cuein="<?php echo $this->cueIn1; ?>"
@ -16,7 +16,7 @@
<dd class="edit-error"></dd>
<?php }
if (isset($this->item2Url)) {?>
<dt><? echo _("Fade in: "); ?><span class='spl_cue_hint'><? echo _("(ss.t)")?></span></dt>
<dt><?php echo _("Fade in: "); ?><span class='spl_cue_hint'><?php echo _("(ss.t)")?></span></dt>
<dd id="spl_fade_in_<?php echo $this->item2; ?>" class="spl_fade_in"
data-fadein="<?php echo $this->item2Url; ?>"
data-offset="<?php if ($this->item1Type == 0) { echo $this->offset; } else { echo 0; } ?>"

View File

@ -29,7 +29,7 @@
position: absolute;
margin: 0;
padding: 0;
background: #3e3e3e;
background: #6e6e6e;
}
.state-select {

View File

@ -21,7 +21,7 @@ var Config = function(params) {
UITheme: "default", // bootstrap || jQueryUI || default
waveColor: 'grey',
waveColor: '#c7c7c7',
progressColor: 'orange',
loadingColor: 'purple',
cursorColor: 'green',

View File

@ -231,7 +231,6 @@ s = switch(id="schedule_noise_switch",
s = if dj_live_stream_port != 0 and dj_live_stream_mp != "" then
dj_live = mksafe(
id="dj_live_mksafe",
audio_to_stereo(
input.harbor(id="live_dj_harbor",
dj_live_stream_mp,
@ -254,7 +253,6 @@ end
s = if master_live_stream_port != 0 and master_live_stream_mp != "" then
master_dj = mksafe(
id="master_dj_mksafe",
audio_to_stereo(
input.harbor(id="master_harbor",
master_live_stream_mp,

View File

@ -30,10 +30,16 @@ class ListenerStat(Thread):
return self.api_client.get_stream_parameters()
def get_stream_server_xml(self, ip, url):
def get_stream_server_xml(self, ip, url, is_shoutcast=False):
encoded = base64.b64encode("%(admin_user)s:%(admin_pass)s" % ip)
header = {"Authorization":"Basic %s" % encoded}
if is_shoutcast:
#user agent is required for shoutcast auth, otherwise it returns 404.
user_agent = "Mozilla/5.0 (Linux; rv:22.0) Gecko/20130405 Firefox/22.0"
header["User-Agent"] = user_agent
req = urllib2.Request(
#assuming that the icecast stats path is /admin/stats.xml
#need to fix this
@ -70,7 +76,7 @@ class ListenerStat(Thread):
def get_shoutcast_stats(self, ip):
url = 'http://%(host)s:%(port)s/admin.cgi?sid=1&mode=viewxml' % ip
document = self.get_stream_server_xml(ip, url)
document = self.get_stream_server_xml(ip, url, is_shoutcast=True)
dom = xml.dom.minidom.parseString(document)
current_listeners = dom.getElementsByTagName("CURRENTLISTENERS")