From 2e33c7a2f70af82c7a21ea8b58cea8f7819cff5e Mon Sep 17 00:00:00 2001 From: rembo10 Date: Tue, 30 Oct 2012 18:39:34 -0400 Subject: [PATCH] Fixed some of the xld code in the postprocessor to work with new config values --- headphones/postprocessor.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/headphones/postprocessor.py b/headphones/postprocessor.py index 5f79009b..1942ec5d 100644 --- a/headphones/postprocessor.py +++ b/headphones/postprocessor.py @@ -28,15 +28,6 @@ from lib.beets.mediafile import MediaFile import headphones from headphones import db, albumart, librarysync, lyrics, logger, helpers -# xld - -if headphones.ADVANCEDENCODER.lower().startswith('xld'): - XLDPROFILE = headphones.ADVANCEDENCODER[4:] - import getXldProfile - XLD = True -else: - XLD = False - postprocessor_lock = threading.Lock() def checkFolder(): @@ -167,9 +158,11 @@ def verify(albumid, albumpath): # use xld to split cue - if XLD and headphones.MUSIC_ENCODER and downloaded_cuecount and downloaded_cuecount >= len(downloaded_track_list): - - (xldProfile, xldFormat, xldBitrate) = getXldProfile.getXldProfile(XLDPROFILE) + if headphones.ENCODER == 'xld' and headphones.MUSIC_ENCODER and downloaded_cuecount and downloaded_cuecount >= len(downloaded_track_list): + + import getXldProfile + + (xldProfile, xldFormat, xldBitrate) = getXldProfile.getXldProfile(headphones.XLDPROFILE) if not xldFormat: logger.info(u'Details for xld profile "%s" not found, cannot split cue' % (xldProfile)) else: