1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-22 05:31:22 +00:00
nixpkgs/pkgs/tools/audio/beets/mediafile-codec-fix.patch
aszlig 2acc258dff
beets: Allow to configure plugin dependencies.
This also fleshes out/fixes the unit tests, which I've used for
gathering the individual requirements.

Along various Python dependencies we now also have a build-time
dependency on bashInteractive and a runtime dependency on
bashCompletion, which is needed for command line completion to work
correctly.

However, some tests for the shell completion fail at the moment, so I've
disabled them for now.

The patch for fixing mediafile codec info is a modified version of
sampsyo/beets@903e88a, where I just dropped the second hunk modifying
the changelog. It is already merged to master and thus expected to be in
the next upstream version.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-12-30 23:05:22 +01:00

26 lines
1,015 B
Diff

From 903e88a228d6bd93bd1884c59dd23dd9f04a1199 Mon Sep 17 00:00:00 2001
From: Adrian Sampson <adrian@radbox.org>
Date: Wed, 26 Nov 2014 19:04:40 -0800
Subject: [PATCH] Fix codec reference in MediaFile (fix #1117)
---
beets/mediafile.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/beets/mediafile.py b/beets/mediafile.py
index ce42621..a459e09 100644
--- a/beets/mediafile.py
+++ b/beets/mediafile.py
@@ -1340,8 +1340,9 @@ def __init__(self, path, id3v23=False):
raise FileTypeError(path)
elif (type(self.mgfile).__name__ == 'M4A' or
type(self.mgfile).__name__ == 'MP4'):
- if hasattr(self.mgfile.info, 'codec'):
- if self.mgfile.codec and self.mgfile.codec.startswith('alac'):
+ info = self.mgfile.info
+ if hasattr(info, 'codec'):
+ if info.codec and info.codec.startswith('alac'):
self.type = 'alac'
else:
self.type = 'aac'