From f5637f8a4292075284fd54c0ddd28934e7e8edd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Nejus?= Date: Tue, 17 Feb 2026 01:17:27 +0000 Subject: [PATCH] Fix mp3gain/aacgain paths on Windows Fixes #2946 --- beetsplug/replaygain.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/beetsplug/replaygain.py b/beetsplug/replaygain.py index e83345059..edc7dbc1f 100644 --- a/beetsplug/replaygain.py +++ b/beetsplug/replaygain.py @@ -643,15 +643,17 @@ class CommandBackend(Backend): # tag-writing; this turns the mp3gain/aacgain tool into a gain # calculator rather than a tag manipulator because we take care # of changing tags ourselves. - cmd: list[str] = [self.command, "-o", "-s", "s"] - if self.noclip: - # Adjust to avoid clipping. - cmd = [*cmd, "-k"] - else: - # Disable clipping warning. - cmd = [*cmd, "-c"] - cmd = [*cmd, "-d", str(int(target_level - 89))] - cmd = cmd + [syspath(i.path) for i in items] + cmd = [ + self.command, + "-o", + "-s", + "s", + # Avoid clipping or disable clipping warning + "-k" if self.noclip else "-c", + "-d", + str(int(target_level - 89)), + *[str(i.filepath) for i in items], + ] self._log.debug("analyzing {} files", len(items)) self._log.debug("executing {}", " ".join(map(displayable_path, cmd)))