nixpkgs-suyu/pkgs/tools/audio/beets/convert-plugin-ffmpeg-path.patch
Bernardo Meurer 0faf72a557 beets: 1.4.9 -> unstable-2020-12-22
The maintainer has stopped cutting releases[1]. Since the last release,
1.4.9, includes a dependency that is filled with hate speech[2] it's all
the more reason to package the unstable version and eliminate that
requirement.

Moreover a number of fixes, improvements, and features have landed
since.

[1]: https://github.com/beetbox/beets/issues/3625
[2]: https://github.com/NixOS/nixpkgs/pull/90504

Co-authored-by: Doron Behar <doron.behar@gmail.com>
2021-01-03 14:36:53 +02:00

43 lines
2.2 KiB
Diff

diff --git i/beetsplug/convert.py w/beetsplug/convert.py
index 70363f6e..2962aa4f 100644
--- i/beetsplug/convert.py
+++ w/beetsplug/convert.py
@@ -81,7 +81,7 @@ def get_format(fmt=None):
command = config['convert']['command'].as_str()
elif 'opts' in keys:
# Undocumented option for backwards compatibility with < 1.3.1.
- command = u'ffmpeg -i $source -y {0} $dest'.format(
+ command = u'@ffmpeg@/bin/ffmpeg -i $source -y {0} $dest'.format(
config['convert']['opts'].as_str()
)
if 'extension' in keys:
@@ -121,22 +121,22 @@ class ConvertPlugin(BeetsPlugin):
u'id3v23': u'inherit',
u'formats': {
u'aac': {
- u'command': u'ffmpeg -i $source -y -vn -acodec aac '
+ u'command': u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec aac '
u'-aq 1 $dest',
u'extension': u'm4a',
},
u'alac': {
- u'command': u'ffmpeg -i $source -y -vn -acodec alac $dest',
+ u'command': u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec alac $dest',
u'extension': u'm4a',
},
- u'flac': u'ffmpeg -i $source -y -vn -acodec flac $dest',
- u'mp3': u'ffmpeg -i $source -y -vn -aq 2 $dest',
+ u'flac': u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec flac $dest',
+ u'mp3': u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -aq 2 $dest',
u'opus':
- u'ffmpeg -i $source -y -vn -acodec libopus -ab 96k $dest',
+ u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec libopus -ab 96k $dest',
u'ogg':
- u'ffmpeg -i $source -y -vn -acodec libvorbis -aq 3 $dest',
+ u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec libvorbis -aq 3 $dest',
u'wma':
- u'ffmpeg -i $source -y -vn -acodec wmav2 -vn $dest',
+ u'@ffmpeg@/bin/ffmpeg -i $source -y -vn -acodec wmav2 -vn $dest',
},
u'max_bitrate': 500,
u'auto': False,