add legacy script for liquidsoap 1.1.1 compatibility
This commit is contained in:
parent
1c2906f5ab
commit
0931ba842a
6 changed files with 890 additions and 25 deletions
|
@ -5,6 +5,7 @@ import argparse
|
|||
import os
|
||||
import generate_liquidsoap_cfg
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
PYPO_HOME = '/var/tmp/airtime/pypo/'
|
||||
|
||||
|
@ -21,11 +22,15 @@ def run():
|
|||
logging.basicConfig(level=getattr(logging, 'DEBUG', None))
|
||||
|
||||
generate_liquidsoap_cfg.run()
|
||||
script_path = os.path.join(os.path.dirname(__file__), 'ls_script.liq')
|
||||
|
||||
''' check liquidsoap version if less than 1.3 use legacy liquidsoap script '''
|
||||
liquidsoap_version=subprocess.check_output("liquidsoap --version", shell=True)
|
||||
if "1.1.1" not in liquidsoap_version:
|
||||
script_path = os.path.join(os.path.dirname(__file__), 'ls_script.liq')
|
||||
else:
|
||||
script_path = os.path.join(os.path.dirname(__file__), 'ls_script_legacy.liq')
|
||||
if args.debug:
|
||||
os.execl('/usr/bin/liquidsoap', 'airtime-liquidsoap', script_path, '--verbose', '-f', '--debug')
|
||||
else:
|
||||
os.execl('/usr/bin/liquidsoap', 'airtime-liquidsoap', script_path, '--verbose', '-f')
|
||||
|
||||
run()
|
||||
run()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue