Skip to content

Commit 4a79b94

Browse files
authored
r128gain: 1.0.3 -> 1.0.7 (#239196)
2 parents aa00c21 + eda0106 commit 4a79b94

File tree

2 files changed

+32
-30
lines changed

2 files changed

+32
-30
lines changed

pkgs/applications/audio/r128gain/default.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010
python3Packages.buildPythonApplication rec {
1111
pname = "r128gain";
12-
version = "1.0.3";
12+
version = "1.0.7";
1313

1414
src = fetchFromGitHub {
1515
owner = "desbma";
1616
repo = "r128gain";
1717
rev = version;
18-
sha256 = "0w2i2szajv1vcmc96w0fczdr8xc28ijcf1gdg180f21gi6yh96sc";
18+
sha256 = "sha256-JyKacDqjIKTNl2GjbJPkgbakF8HR4Jd4czAtOaemDH8=";
1919
};
2020

2121
patches = [
Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1-
--- i/r128gain/__init__.py
2-
+++ w/r128gain/__init__.py
3-
@@ -78,7 +78,7 @@ def get_ffmpeg_lib_versions(ffmpeg_path=None):
4-
Example: 0x3040100 for FFmpeg 3.4.1
5-
"""
6-
r = collections.OrderedDict()
7-
- cmd = (ffmpeg_path or "ffmpeg", "-version")
8-
+ cmd = (ffmpeg_path or "@ffmpeg@/bin/ffmpeg", "-version")
9-
output = subprocess.run(cmd,
10-
check=True,
11-
stdout=subprocess.PIPE,
12-
@@ -156,7 +156,7 @@ def get_r128_loudness(audio_filepaths, *, calc_peak=True, enable_ffmpeg_threadin
13-
os.devnull,
14-
**additional_ffmpeg_args,
15-
f="null").global_args("-hide_banner", "-nostats"),
16-
- cmd=ffmpeg_path or "ffmpeg")
17-
+ cmd=ffmpeg_path or "@ffmpeg@/bin/ffmpeg")
1+
diff --git a/r128gain/__init__.py b/r128gain/__init__.py
2+
index 79a5cbd..d8f13ba 100755
3+
--- a/r128gain/__init__.py
4+
+++ b/r128gain/__init__.py
5+
@@ -86,7 +86,7 @@ def get_ffmpeg_lib_versions(ffmpeg_path: Optional[str] = None) -> Dict[str, int]
6+
Example: 0x3040100 for FFmpeg 3.4.1
7+
"""
8+
r = collections.OrderedDict()
9+
- cmd = (ffmpeg_path or "ffmpeg", "-version")
10+
+ cmd = (ffmpeg_path or "@ffmpeg@/bin/ffmpeg", "-version")
11+
output_str = subprocess.run(cmd, check=True, stdout=subprocess.PIPE, universal_newlines=True).stdout
12+
output_lines = output_str.splitlines()
13+
lib_version_regex = re.compile(r"^\s*(lib[a-z]+)\s+([0-9]+).\s*([0-9]+).\s*([0-9]+)\s+")
14+
@@ -194,7 +194,7 @@ def get_r128_loudness( # noqa: C901
15+
ffmpeg.output(*output_streams, os.devnull, **additional_ffmpeg_args, f="null").global_args(
16+
"-hide_banner", "-nostats"
17+
),
18+
- cmd=ffmpeg_path or "ffmpeg",
19+
+ cmd=ffmpeg_path or "@ffmpeg@/bin/ffmpeg",
20+
)
1821

19-
# run
20-
logger().debug(cmd_to_string(cmd))
21-
@@ -740,7 +740,7 @@ def cl_main():
22-
help="Maximum number of tracks to scan in parallel. If not specified, autodetect CPU count")
23-
arg_parser.add_argument("-f",
24-
"--ffmpeg-path",
25-
- default=shutil.which("ffmpeg"),
26-
+ default="@ffmpeg@/bin/ffmpeg",
27-
help="""Full file path of ffmpeg executable (only needed if not in PATH).
28-
If not specified, autodetect""")
29-
arg_parser.add_argument("-d",
22+
# run
23+
@@ -885,7 +885,7 @@ def cl_main() -> None:
24+
arg_parser.add_argument(
25+
"-f",
26+
"--ffmpeg-path",
27+
- default=shutil.which("ffmpeg"),
28+
+ default="@ffmpeg@/bin/ffmpeg",
29+
help="""Full file path of ffmpeg executable (only needed if not in PATH).
30+
If not specified, autodetect""",
31+
)

0 commit comments

Comments
 (0)