From 1895686c85dba0928acee4c2707f427a54b7a3d8 Mon Sep 17 00:00:00 2001 From: Martin Konecny Date: Mon, 6 May 2013 16:39:17 -0400 Subject: [PATCH] CC-5098: Liquidsoap: Restart liquidsoap will make the output stream silence until next song starts -fixed --- python_apps/pypo/pypofetch.py | 2 ++ python_apps/pypo/pypoliquidsoap.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/python_apps/pypo/pypofetch.py b/python_apps/pypo/pypofetch.py index 90d4ee0f7..20212be51 100644 --- a/python_apps/pypo/pypofetch.py +++ b/python_apps/pypo/pypofetch.py @@ -174,6 +174,8 @@ class PypoFetch(Thread): commands.append(('vars.default_dj_fade %s\n' % fade).encode('utf-8')) self.pypo_liquidsoap.get_telnet_dispatcher().telnet_send(commands) + self.pypo_liquidsoap.clear_queue_tracker() + def restart_liquidsoap(self): try: self.telnet_lock.acquire() diff --git a/python_apps/pypo/pypoliquidsoap.py b/python_apps/pypo/pypoliquidsoap.py index 7e685adae..860049b24 100644 --- a/python_apps/pypo/pypoliquidsoap.py +++ b/python_apps/pypo/pypoliquidsoap.py @@ -195,6 +195,10 @@ class PypoLiquidsoap(): def is_file(self, media_item): return media_item["type"] == eventtypes.FILE + def clear_queue_tracker(self): + for i in self.liq_queue_tracker.keys(): + self.liq_queue_tracker[i] = None + def modify_cue_point(self, link): if not self.is_file(link): return