From 05afd286d6525d6ca9ddb025f3b41173b8341409 Mon Sep 17 00:00:00 2001 From: Yoann QUERET Date: Mon, 8 Feb 2016 19:21:04 +0000 Subject: [PATCH] Optimize duplicated code --- encoder.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/encoder.py b/encoder.py index 7b2bc5f..8a1b104 100755 --- a/encoder.py +++ b/encoder.py @@ -112,14 +112,12 @@ def run_encoder(self): if self.config.source_type == 'alsa': args += ' -d %s' % (self.config.source_device) - if self.config.source_driftcomp == True: - args += ' -D' if self.config.source_type == 'stream': args += ' --vlc-uri=%s' % (self.config.source_url) logger.warn('%s' % args) - if self.config.source_driftcomp == True: - args += ' -D' - logger.warn('%s' % args) + if self.config.source_driftcomp == True: + args += ' -D' + logger.warn('%s' % args) args += ' -b %s -r %s' % (self.config.output_bitrate, self.config.output_samplerate) if self.config.output_sbr == True: