From 225455af096ff4294d9d63f307b52084b1f6b2b0 Mon Sep 17 00:00:00 2001 From: Lucas Bickel Date: Tue, 4 Apr 2017 13:13:13 +0200 Subject: [PATCH 1/3] Do not explicity load pervasives.liq As per the liquidsoap docs the file is loaded per default anyhow http://savonet.sourceforge.net/doc-svn/script_loading.html. I think the output.shoutcast might be the only place where we really use it though. Testing this against shoutcast would be nice, but I don't have one and am not sure how relevant it still is. --- utils/airtime-test-stream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/airtime-test-stream.py b/utils/airtime-test-stream.py index a2ab06982..7121c8c0b 100644 --- a/utils/airtime-test-stream.py +++ b/utils/airtime-test-stream.py @@ -98,7 +98,7 @@ try: if stream_type == "icecast": command = "%s 'output.icecast(%%vorbis, host = \"%s\", port = %s, user= \"%s\", password = \"%s\", mount=\"%s\", sine())'" % (liquidsoap_exe, host, port, user, password, mount) else: - command = "%s /usr/lib/airtime/pypo/bin/liquidsoap_scripts/library/pervasives.liq 'output.shoutcast(%%mp3, host=\"%s\", port = %s, user= \"%s\", password = \"%s\", sine())'" \ + command = "%s 'output.shoutcast(%%mp3, host=\"%s\", port = %s, user= \"%s\", password = \"%s\", sine())'" \ % (liquidsoap_exe, host, port, user, password) if not verbose: From a4244595e547bce049507afe9db3b715c76a2c92 Mon Sep 17 00:00:00 2001 From: Robb Ebright Date: Sat, 8 Apr 2017 18:05:11 -0400 Subject: [PATCH 2/3] used liquidsoap in command vs. airtime-liquidsoap --- utils/airtime-test-stream.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/utils/airtime-test-stream.py b/utils/airtime-test-stream.py index 7121c8c0b..fa1d200c6 100644 --- a/utils/airtime-test-stream.py +++ b/utils/airtime-test-stream.py @@ -30,6 +30,8 @@ def printUsage(): def find_liquidsoap_binary(): """ + With libretime 3.0 we are no longer depending upon airtime-liquidsoap but using the built in liquidsoap + rather than a bundled version of it. So this function no longer needs to be used. Starting with Airtime 2.0, we don't know the exact location of the Liquidsoap binary because it may have been installed through a debian package. Let's find the location of this binary. @@ -91,15 +93,14 @@ try: print "Outputting to %s streaming server. You should be able to hear a monotonous tone on '%s'. Press ctrl-c to quit." % (stream_type, url) liquidsoap_exe = find_liquidsoap_binary() - if liquidsoap_exe is None: raise Exception("Liquidsoap not found!") if stream_type == "icecast": - command = "%s 'output.icecast(%%vorbis, host = \"%s\", port = %s, user= \"%s\", password = \"%s\", mount=\"%s\", sine())'" % (liquidsoap_exe, host, port, user, password, mount) + command = "liquidsoap 'output.icecast(%%vorbis, host = \"%s\", port = %s, user= \"%s\", password = \"%s\", mount=\"%s\", sine())'" % (host, port, user, password, mount) else: - command = "%s 'output.shoutcast(%%mp3, host=\"%s\", port = %s, user= \"%s\", password = \"%s\", sine())'" \ - % (liquidsoap_exe, host, port, user, password) + command = "liquidsoap 'output.shoutcast(%%mp3, host=\"%s\", port = %s, user= \"%s\", password = \"%s\", sine())'" \ + % (host, port, user, password) if not verbose: command += " 2>/dev/null | grep \"failed\"" From 37bfe34b9e8a4463ecdb0933e4e4c5970f23575f Mon Sep 17 00:00:00 2001 From: Lucas Bickel Date: Sun, 9 Apr 2017 11:46:49 +0200 Subject: [PATCH 3/3] Check for liquidsoap on PATH --- utils/airtime-test-stream.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/utils/airtime-test-stream.py b/utils/airtime-test-stream.py index fa1d200c6..5a5bce9c2 100644 --- a/utils/airtime-test-stream.py +++ b/utils/airtime-test-stream.py @@ -30,16 +30,14 @@ def printUsage(): def find_liquidsoap_binary(): """ - With libretime 3.0 we are no longer depending upon airtime-liquidsoap but using the built in liquidsoap - rather than a bundled version of it. So this function no longer needs to be used. - Starting with Airtime 2.0, we don't know the exact location of the Liquidsoap - binary because it may have been installed through a debian package. Let's find - the location of this binary. + With libretime 3.0 we are no longer depending upon the airtime-liquidsoap binary + but use a generic install of liquidsoap. This takes care of checking if it is on the + path and will lead to an error otherwise. """ - rv = subprocess.call("which airtime-liquidsoap > /dev/null", shell=True) + rv = subprocess.call("which liquidsoap > /dev/null", shell=True) if rv == 0: - return "airtime-liquidsoap" + return "liquidsoap" return None @@ -97,10 +95,10 @@ try: raise Exception("Liquidsoap not found!") if stream_type == "icecast": - command = "liquidsoap 'output.icecast(%%vorbis, host = \"%s\", port = %s, user= \"%s\", password = \"%s\", mount=\"%s\", sine())'" % (host, port, user, password, mount) + command = "%s 'output.icecast(%%vorbis, host = \"%s\", port = %s, user= \"%s\", password = \"%s\", mount=\"%s\", sine())'" % (liquidsoap_exe, host, port, user, password, mount) else: - command = "liquidsoap 'output.shoutcast(%%mp3, host=\"%s\", port = %s, user= \"%s\", password = \"%s\", sine())'" \ - % (host, port, user, password) + command = "%s 'output.shoutcast(%%mp3, host=\"%s\", port = %s, user= \"%s\", password = \"%s\", sine())'" \ + % (liquidsoap_exe, host, port, user, password) if not verbose: command += " 2>/dev/null | grep \"failed\""