diff --git a/airtime_mvc/public/js/airtime/preferences/streamsetting.js b/airtime_mvc/public/js/airtime/preferences/streamsetting.js
index b3cefaa29..304ce69ff 100644
--- a/airtime_mvc/public/js/airtime/preferences/streamsetting.js
+++ b/airtime_mvc/public/js/airtime/preferences/streamsetting.js
@@ -404,9 +404,9 @@ function setupEventListeners() {
content: {
text: sprintf(
$.i18n._("Some steam types require extra configuration. Details about enabling %sAAC+ Support%s or %sOpus Support%s are provided."),
- "",
+ "",
"",
- "",
+ "",
"")
},
hide: {
diff --git a/python_apps/pypo/pypocli.py b/python_apps/pypo/pypocli.py
index 42d3205b4..fd19693cd 100644
--- a/python_apps/pypo/pypocli.py
+++ b/python_apps/pypo/pypocli.py
@@ -174,7 +174,7 @@ def liquidsoap_get_info(telnet_lock, host, port, logger):
return get_liquidsoap_version(response)
def get_liquidsoap_version(version_string):
- m = re.match(r"Liquidsoap (\d+.\d+.\d+)", "Liquidsoap 1.1.1")
+ m = re.match(r"Liquidsoap (\d+.\d+.\d+)", version_string)
if m:
return m.group(1)
diff --git a/python_apps/pypo/telnetliquidsoap.py b/python_apps/pypo/telnetliquidsoap.py
index 0cfb8709c..069a727aa 100644
--- a/python_apps/pypo/telnetliquidsoap.py
+++ b/python_apps/pypo/telnetliquidsoap.py
@@ -27,8 +27,16 @@ class TelnetLiquidsoap:
def __connect(self):
return telnetlib.Telnet(self.ls_host, self.ls_port)
- def __is_empty(self, tn, queue_id):
+ def __is_empty(self, queue_id):
return True
+ tn = self.__connect()
+ msg = '%s.queue\nexit\n' % queue_id
+ tn.write(msg)
+ output = tn.read_all().splitlines()
+ if len(output) == 3:
+ return len(output[0]) == 0
+ else:
+ raise Exception("Unexpected list length returned: %s" % output)
def queue_clear_all(self):
try:
@@ -67,11 +75,11 @@ class TelnetLiquidsoap:
def queue_push(self, queue_id, media_item):
try:
self.telnet_lock.acquire()
- tn = self.__connect()
- if not self.__is_empty(tn, queue_id):
+ if not self.__is_empty(queue_id):
raise QueueNotEmptyException()
+ tn = self.__connect()
annotation = create_liquidsoap_annotation(media_item)
msg = '%s.push %s\n' % (queue_id, annotation.encode('utf-8'))
self.logger.debug(msg)