20 lines
423 B
Python
20 lines
423 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)
|