feat(analyzer): override paths using env variables
Allow overriding FFMPEG, FFPROBE, or LIQUIDSOAP paths using env variables.
This commit is contained in:
parent
9413bd5a29
commit
04e5a7e404
4 changed files with 14 additions and 7 deletions
|
@ -5,14 +5,13 @@ from typing import Any, Dict
|
|||
|
||||
from loguru import logger
|
||||
|
||||
from ._liquidsoap import LIQUIDSOAP
|
||||
|
||||
|
||||
class UnplayableFileError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
LIQUIDSOAP_EXECUTABLE = "liquidsoap"
|
||||
|
||||
|
||||
def analyze_playability(filename: str, metadata: Dict[str, Any]):
|
||||
"""Checks if a file can be played by Liquidsoap.
|
||||
:param filename: The full path to the file to analyzer
|
||||
|
@ -20,7 +19,7 @@ def analyze_playability(filename: str, metadata: Dict[str, Any]):
|
|||
:return: The metadata dictionary
|
||||
"""
|
||||
command = [
|
||||
LIQUIDSOAP_EXECUTABLE,
|
||||
LIQUIDSOAP,
|
||||
"-v",
|
||||
"-c",
|
||||
"output.dummy(audio_to_stereo(single(argv(1))))",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue