Merge branch 'master' of dev.sourcefabric.org:airtime
This commit is contained in:
commit
ec87a8ff88
|
@ -3,7 +3,7 @@
|
||||||
<input type="button" class="pl-waveform-fades-btn" value="<?php echo _("Show Waveform")?>"></input>
|
<input type="button" class="pl-waveform-fades-btn" value="<?php echo _("Show Waveform")?>"></input>
|
||||||
</dd>
|
</dd>
|
||||||
<?php if ($this->item1Type == 0) {?>
|
<?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"
|
<dd id="spl_fade_out_<?php echo $this->item1; ?>" class="spl_fade_out"
|
||||||
data-fadeout="<?php echo $this->item1Url; ?>"
|
data-fadeout="<?php echo $this->item1Url; ?>"
|
||||||
data-cuein="<?php echo $this->cueIn1; ?>"
|
data-cuein="<?php echo $this->cueIn1; ?>"
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
<dd class="edit-error"></dd>
|
<dd class="edit-error"></dd>
|
||||||
<?php }
|
<?php }
|
||||||
if (isset($this->item2Url)) {?>
|
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"
|
<dd id="spl_fade_in_<?php echo $this->item2; ?>" class="spl_fade_in"
|
||||||
data-fadein="<?php echo $this->item2Url; ?>"
|
data-fadein="<?php echo $this->item2Url; ?>"
|
||||||
data-offset="<?php if ($this->item1Type == 0) { echo $this->offset; } else { echo 0; } ?>"
|
data-offset="<?php if ($this->item1Type == 0) { echo $this->offset; } else { echo 0; } ?>"
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background: #3e3e3e;
|
background: #6e6e6e;
|
||||||
}
|
}
|
||||||
|
|
||||||
.state-select {
|
.state-select {
|
||||||
|
|
|
@ -21,7 +21,7 @@ var Config = function(params) {
|
||||||
|
|
||||||
UITheme: "default", // bootstrap || jQueryUI || default
|
UITheme: "default", // bootstrap || jQueryUI || default
|
||||||
|
|
||||||
waveColor: 'grey',
|
waveColor: '#c7c7c7',
|
||||||
progressColor: 'orange',
|
progressColor: 'orange',
|
||||||
loadingColor: 'purple',
|
loadingColor: 'purple',
|
||||||
cursorColor: 'green',
|
cursorColor: 'green',
|
||||||
|
|
|
@ -231,7 +231,6 @@ s = switch(id="schedule_noise_switch",
|
||||||
|
|
||||||
s = if dj_live_stream_port != 0 and dj_live_stream_mp != "" then
|
s = if dj_live_stream_port != 0 and dj_live_stream_mp != "" then
|
||||||
dj_live = mksafe(
|
dj_live = mksafe(
|
||||||
id="dj_live_mksafe",
|
|
||||||
audio_to_stereo(
|
audio_to_stereo(
|
||||||
input.harbor(id="live_dj_harbor",
|
input.harbor(id="live_dj_harbor",
|
||||||
dj_live_stream_mp,
|
dj_live_stream_mp,
|
||||||
|
@ -254,7 +253,6 @@ end
|
||||||
|
|
||||||
s = if master_live_stream_port != 0 and master_live_stream_mp != "" then
|
s = if master_live_stream_port != 0 and master_live_stream_mp != "" then
|
||||||
master_dj = mksafe(
|
master_dj = mksafe(
|
||||||
id="master_dj_mksafe",
|
|
||||||
audio_to_stereo(
|
audio_to_stereo(
|
||||||
input.harbor(id="master_harbor",
|
input.harbor(id="master_harbor",
|
||||||
master_live_stream_mp,
|
master_live_stream_mp,
|
||||||
|
|
|
@ -30,10 +30,16 @@ class ListenerStat(Thread):
|
||||||
return self.api_client.get_stream_parameters()
|
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)
|
encoded = base64.b64encode("%(admin_user)s:%(admin_pass)s" % ip)
|
||||||
|
|
||||||
header = {"Authorization":"Basic %s" % encoded}
|
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(
|
req = urllib2.Request(
|
||||||
#assuming that the icecast stats path is /admin/stats.xml
|
#assuming that the icecast stats path is /admin/stats.xml
|
||||||
#need to fix this
|
#need to fix this
|
||||||
|
@ -70,7 +76,7 @@ class ListenerStat(Thread):
|
||||||
|
|
||||||
def get_shoutcast_stats(self, ip):
|
def get_shoutcast_stats(self, ip):
|
||||||
url = 'http://%(host)s:%(port)s/admin.cgi?sid=1&mode=viewxml' % 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)
|
dom = xml.dom.minidom.parseString(document)
|
||||||
current_listeners = dom.getElementsByTagName("CURRENTLISTENERS")
|
current_listeners = dom.getElementsByTagName("CURRENTLISTENERS")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue