Merge branch '2.3.x' into 2.3.x-saas
This commit is contained in:
commit
22aafda2a8
|
@ -60,8 +60,10 @@ class AudiopreviewController extends Zend_Controller_Action
|
||||||
$this->view->uri = $uri;
|
$this->view->uri = $uri;
|
||||||
$this->view->mime = $mime;
|
$this->view->mime = $mime;
|
||||||
$this->view->audioFileID = $audioFileID;
|
$this->view->audioFileID = $audioFileID;
|
||||||
$this->view->audioFileArtist = $audioFileArtist;
|
// We need to decode artist and title because it gets
|
||||||
$this->view->audioFileTitle = $audioFileTitle;
|
// encoded twice in js
|
||||||
|
$this->view->audioFileArtist = urldecode($audioFileArtist);
|
||||||
|
$this->view->audioFileTitle = urldecode($audioFileTitle);
|
||||||
$this->view->type = $type;
|
$this->view->type = $type;
|
||||||
|
|
||||||
$this->_helper->viewRenderer->setRender('audio-preview');
|
$this->_helper->viewRenderer->setRender('audio-preview');
|
||||||
|
|
|
@ -132,8 +132,8 @@ class PypoFetch(Thread):
|
||||||
elif(sourcename == "live_dj"):
|
elif(sourcename == "live_dj"):
|
||||||
command += "live_dj_harbor.kick\n"
|
command += "live_dj_harbor.kick\n"
|
||||||
|
|
||||||
lock.acquire()
|
|
||||||
try:
|
try:
|
||||||
|
lock.acquire()
|
||||||
tn = telnetlib.Telnet(LS_HOST, LS_PORT)
|
tn = telnetlib.Telnet(LS_HOST, LS_PORT)
|
||||||
tn.write(command)
|
tn.write(command)
|
||||||
tn.write('exit\n')
|
tn.write('exit\n')
|
||||||
|
@ -159,8 +159,9 @@ class PypoFetch(Thread):
|
||||||
else:
|
else:
|
||||||
command += "stop\n"
|
command += "stop\n"
|
||||||
|
|
||||||
lock.acquire()
|
|
||||||
try:
|
try:
|
||||||
|
lock.acquire()
|
||||||
|
|
||||||
tn = telnetlib.Telnet(LS_HOST, LS_PORT)
|
tn = telnetlib.Telnet(LS_HOST, LS_PORT)
|
||||||
tn.write(command)
|
tn.write(command)
|
||||||
tn.write('exit\n')
|
tn.write('exit\n')
|
||||||
|
@ -179,7 +180,6 @@ class PypoFetch(Thread):
|
||||||
info = self.api_client.get_bootstrap_info()
|
info = self.api_client.get_bootstrap_info()
|
||||||
if info is None:
|
if info is None:
|
||||||
self.logger.error('Unable to get bootstrap info.. Exiting pypo...')
|
self.logger.error('Unable to get bootstrap info.. Exiting pypo...')
|
||||||
sys.exit(1)
|
|
||||||
else:
|
else:
|
||||||
self.logger.debug('info:%s', info)
|
self.logger.debug('info:%s', info)
|
||||||
for k, v in info['switch_status'].iteritems():
|
for k, v in info['switch_status'].iteritems():
|
||||||
|
@ -190,8 +190,8 @@ class PypoFetch(Thread):
|
||||||
|
|
||||||
def restart_liquidsoap(self):
|
def restart_liquidsoap(self):
|
||||||
|
|
||||||
self.telnet_lock.acquire()
|
|
||||||
try:
|
try:
|
||||||
|
self.telnet_lock.acquire()
|
||||||
self.logger.info("Restarting Liquidsoap")
|
self.logger.info("Restarting Liquidsoap")
|
||||||
subprocess.call('/etc/init.d/airtime-liquidsoap restart', shell=True)
|
subprocess.call('/etc/init.d/airtime-liquidsoap restart', shell=True)
|
||||||
|
|
||||||
|
@ -322,8 +322,8 @@ class PypoFetch(Thread):
|
||||||
This function updates the bootup time variable in Liquidsoap script
|
This function updates the bootup time variable in Liquidsoap script
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.telnet_lock.acquire()
|
|
||||||
try:
|
try:
|
||||||
|
self.telnet_lock.acquire()
|
||||||
tn = telnetlib.Telnet(LS_HOST, LS_PORT)
|
tn = telnetlib.Telnet(LS_HOST, LS_PORT)
|
||||||
# update the boot up time of Liquidsoap. Since Liquidsoap is not restarting,
|
# update the boot up time of Liquidsoap. Since Liquidsoap is not restarting,
|
||||||
# we are manually adjusting the bootup time variable so the status msg will get
|
# we are manually adjusting the bootup time variable so the status msg will get
|
||||||
|
@ -395,8 +395,8 @@ class PypoFetch(Thread):
|
||||||
self.logger.info(LS_HOST)
|
self.logger.info(LS_HOST)
|
||||||
self.logger.info(LS_PORT)
|
self.logger.info(LS_PORT)
|
||||||
|
|
||||||
self.telnet_lock.acquire()
|
|
||||||
try:
|
try:
|
||||||
|
self.telnet_lock.acquire()
|
||||||
tn = telnetlib.Telnet(LS_HOST, LS_PORT)
|
tn = telnetlib.Telnet(LS_HOST, LS_PORT)
|
||||||
command = ('vars.station_name %s\n' % station_name).encode('utf-8')
|
command = ('vars.station_name %s\n' % station_name).encode('utf-8')
|
||||||
self.logger.info(command)
|
self.logger.info(command)
|
||||||
|
|
Loading…
Reference in New Issue