nixfiles/musicutil/utils/do_replaygain.py
2022-02-06 15:51:42 +00:00

16 lines
405 B
Python

from ..types import File
from ..meta import r128gain_path, ffmpeg_path
from subprocess import run as run_command
def do_replaygain(file: File, skip_if_existing: bool = True) -> None:
command_args = [
r128gain_path,
"-f", ffmpeg_path,
"-v", "warning",
file.join_path_to()
]
if skip_if_existing:
command_args.append("-s")
run_command(command_args)