From a23001915e10f064aeb9d30e544cecb8182094bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian-Robert=20St=C3=B6ter?= Date: Wed, 20 Dec 2017 12:23:13 +0100 Subject: [PATCH] more explicit fix --- stempeg/write.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/stempeg/write.py b/stempeg/write.py index 4b51726..388735f 100644 --- a/stempeg/write.py +++ b/stempeg/write.py @@ -69,8 +69,13 @@ def write_stems( """ if codec is None: avail = check_available_aac_encoders() - if 'libfdk_aac' in avail: - codec = 'libfdk_aac' + + if avail is not None: + if 'libfdk_aac' in avail: + codec = 'libfdk_aac' + else: + codec = 'aac' + warnings.warn("For better quality, please install libfdc_aac") else: codec = 'aac' warnings.warn("For better quality, please install libfdc_aac")