mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
beets: Use bs1770gain by default for replaygain
After trying with a dozen files, it seems the bs1770gain backend is much more reliable than the audiotools backend and especially does a better job (well, compared to audiotools which either does doing nothing at all or throws an exception) when used on alboms that contain different sample rates/sizes. Additionally, we already had a few issues regarding the audiotools backend, even to the extent that @sampsyco almost wanted to drop it upstream (see sampsyco/beets#1342). Also related issues are #10376 and sampsyo/beets#1592. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
This commit is contained in:
parent
59455da528
commit
68c504fa8f
2 changed files with 10 additions and 5 deletions
|
@ -8,7 +8,7 @@
|
|||
, enableFetchart ? true
|
||||
, enableLastfm ? true
|
||||
, enableMpd ? true
|
||||
, enableReplaygain ? true
|
||||
, enableReplaygain ? true, bs1770gain ? null
|
||||
, enableThumbnails ? true
|
||||
, enableWeb ? true
|
||||
|
||||
|
@ -22,7 +22,7 @@ assert enableEchonest -> pythonPackages.pyechonest != null;
|
|||
assert enableFetchart -> pythonPackages.responses != null;
|
||||
assert enableLastfm -> pythonPackages.pylast != null;
|
||||
assert enableMpd -> pythonPackages.mpd != null;
|
||||
assert enableReplaygain -> pythonPackages.audiotools != null;
|
||||
assert enableReplaygain -> bs1770gain != null;
|
||||
assert enableThumbnails -> pythonPackages.pyxdg != null;
|
||||
assert enableWeb -> pythonPackages.flask != null;
|
||||
|
||||
|
@ -90,7 +90,6 @@ in buildPythonPackage rec {
|
|||
++ optional enableEchonest pythonPackages.pyechonest
|
||||
++ optional enableLastfm pythonPackages.pylast
|
||||
++ optional enableMpd pythonPackages.mpd
|
||||
++ optional enableReplaygain pythonPackages.audiotools
|
||||
++ optional enableThumbnails pythonPackages.pyxdg
|
||||
++ optional enableWeb pythonPackages.flask;
|
||||
|
||||
|
@ -104,7 +103,7 @@ in buildPythonPackage rec {
|
|||
];
|
||||
|
||||
patches = [
|
||||
./replaygain-default-audiotools.patch
|
||||
./replaygain-default-bs1770gain.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
@ -119,6 +118,12 @@ in buildPythonPackage rec {
|
|||
s,"flac","${flac}/bin/flac",
|
||||
s,"mp3val","${mp3val}/bin/mp3val",
|
||||
}' beetsplug/badfiles.py
|
||||
'' + optionalString enableReplaygain ''
|
||||
sed -i -re '
|
||||
s!^( *cmd *= *b?['\'''"])(bs1770gain['\'''"])!\1${bs1770gain}/bin/\2!
|
||||
' beetsplug/replaygain.py
|
||||
sed -i -e 's/if has_program.*bs1770gain.*:/if True:/' \
|
||||
test/test_replaygain.py
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
|
|
@ -11,7 +11,7 @@ index 40b3a3a..9b54a5a 100644
|
|||
'overwrite': False,
|
||||
'auto': True,
|
||||
- 'backend': u'command',
|
||||
+ 'backend': u'audiotools',
|
||||
+ 'backend': u'bs1770gain',
|
||||
'targetlevel': 89,
|
||||
})
|
||||
|
Loading…
Reference in a new issue