From 2c15c947db21a360106e1f28f4e92e983ffa9595 Mon Sep 17 00:00:00 2001 From: yomguy <> Date: Wed, 15 Apr 2009 16:53:16 +0000 Subject: [PATCH] fix wrong character encoding in core export commands --- telemeta/export/core.py | 7 ++----- telemeta/export/mp3.py | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/telemeta/export/core.py b/telemeta/export/core.py index a4d11e39..dc1cb018 100644 --- a/telemeta/export/core.py +++ b/telemeta/export/core.py @@ -159,19 +159,16 @@ class ExporterCore(Component): def core_process(self, command, buffer_size, dest): """Encode and stream audio data through a generator""" - + __chunk = 0 file_out = open(dest,'w') - try: - proc = subprocess.Popen(command, + proc = subprocess.Popen(command.encode('utf-8'), shell = True, bufsize = buffer_size, stdin = subprocess.PIPE, stdout = subprocess.PIPE, close_fds = True) - except: - raise ExportProcessError('Command failure:', command, proc) # Core processing while True: diff --git a/telemeta/export/mp3.py b/telemeta/export/mp3.py index 6225e432..f76a6058 100644 --- a/telemeta/export/mp3.py +++ b/telemeta/export/mp3.py @@ -135,9 +135,9 @@ class Mp3Exporter(ExporterCore): self.args = self.get_args(options) self.ext = self.get_file_extension() self.args = ' '.join(self.args) - self.command = 'sox "%s" -s -q -b 16 -r 44100 -t wav -c2 - | lame %s -' % (self.source, self.args) + self.command = 'sox "%s" -q -b 16 -r 44100 -t wav - | lame %s -' % (self.source, self.args) #self.command = 'lame %s "%s" -' % (self.args, self.source) - + # Pre-proccessing self.dest = self.pre_process(self.item_id, self.source, -- 2.39.5