CC-1469: Crossfading support (non-equal power)
-fix restarting airtime playout not resyncing to schedule correctly
This commit is contained in:
parent
96579b7ef4
commit
07f0ae6c28
5 changed files with 46 additions and 15 deletions
|
@ -7,11 +7,12 @@ def create_liquidsoap_annotation(media):
|
|||
|
||||
class TelnetLiquidsoap:
|
||||
|
||||
def __init__(self, telnet_lock, logger, ls_host, ls_port):
|
||||
def __init__(self, telnet_lock, logger, ls_host, ls_port, queues):
|
||||
self.telnet_lock = telnet_lock
|
||||
self.ls_host = ls_host
|
||||
self.ls_port = ls_port
|
||||
self.logger = logger
|
||||
self.queues = queues
|
||||
self.current_prebuffering_stream_id = None
|
||||
|
||||
def __connect(self):
|
||||
|
@ -20,6 +21,23 @@ class TelnetLiquidsoap:
|
|||
def __is_empty(self, tn, queue_id):
|
||||
return True
|
||||
|
||||
def queue_clear_all(self):
|
||||
try:
|
||||
self.telnet_lock.acquire()
|
||||
tn = self.__connect()
|
||||
|
||||
for i in self.queues:
|
||||
msg = 'queues.%s_skip\n' % i
|
||||
self.logger.debug(msg)
|
||||
tn.write(msg)
|
||||
|
||||
tn.write("exit\n")
|
||||
self.logger.debug(tn.read_all())
|
||||
except Exception:
|
||||
raise
|
||||
finally:
|
||||
self.telnet_lock.release()
|
||||
|
||||
def queue_remove(self, queue_id):
|
||||
try:
|
||||
self.telnet_lock.acquire()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue