refactor(playout): use pathlib to build the path
This commit is contained in:
parent
2bc7d64cc4
commit
8ef6784a39
|
@ -13,6 +13,8 @@ from loguru import logger
|
||||||
from .entrypoint import generate_entrypoint
|
from .entrypoint import generate_entrypoint
|
||||||
from .version import get_liquidsoap_version
|
from .version import get_liquidsoap_version
|
||||||
|
|
||||||
|
here = Path(__file__).parent
|
||||||
|
|
||||||
|
|
||||||
@click.command(context_settings={"auto_envvar_prefix": DEFAULT_ENV_PREFIX})
|
@click.command(context_settings={"auto_envvar_prefix": DEFAULT_ENV_PREFIX})
|
||||||
@cli_logging_options()
|
@cli_logging_options()
|
||||||
|
@ -27,14 +29,12 @@ def cli(log_level: int, log_filepath: Optional[Path]):
|
||||||
|
|
||||||
version = get_liquidsoap_version()
|
version = get_liquidsoap_version()
|
||||||
|
|
||||||
script_path = os.path.join(
|
script_path = here / f"{version[0]}.{version[1]}/ls_script.liq"
|
||||||
os.path.dirname(__file__), f"{version[0]}.{version[1]}", "ls_script.liq"
|
|
||||||
)
|
|
||||||
exec_args = [
|
exec_args = [
|
||||||
"/usr/bin/liquidsoap",
|
"/usr/bin/liquidsoap",
|
||||||
"libretime-liquidsoap",
|
"libretime-liquidsoap",
|
||||||
"--verbose",
|
"--verbose",
|
||||||
script_path,
|
str(script_path),
|
||||||
]
|
]
|
||||||
if log_level.is_debug():
|
if log_level.is_debug():
|
||||||
exec_args.append("--debug")
|
exec_args.append("--debug")
|
||||||
|
|
Loading…
Reference in New Issue