|
|
@ -3,7 +3,6 @@ from __future__ import unicode_literals
|
|
|
|
import io
|
|
|
|
import io
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
import subprocess
|
|
|
|
import sys
|
|
|
|
|
|
|
|
import time
|
|
|
|
import time
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -269,19 +268,17 @@ class FFmpegExtractAudioPP(FFmpegPostProcessor):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
self._downloader.to_screen('[' + self.basename + '] Destination: ' + new_path)
|
|
|
|
self._downloader.to_screen('[' + self.basename + '] Destination: ' + new_path)
|
|
|
|
self.run_ffmpeg(path, new_path, acodec, more_opts)
|
|
|
|
self.run_ffmpeg(path, new_path, acodec, more_opts)
|
|
|
|
except:
|
|
|
|
except AudioConversionError as e:
|
|
|
|
etype, e, tb = sys.exc_info()
|
|
|
|
raise PostProcessingError(
|
|
|
|
if isinstance(e, AudioConversionError):
|
|
|
|
'audio conversion failed: ' + e.msg)
|
|
|
|
msg = 'audio conversion failed: ' + e.msg
|
|
|
|
except Exception:
|
|
|
|
else:
|
|
|
|
raise PostProcessingError('error running ' + self.basename)
|
|
|
|
msg = 'error running ' + self.basename
|
|
|
|
|
|
|
|
raise PostProcessingError(msg)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Try to update the date time for extracted audio file.
|
|
|
|
# Try to update the date time for extracted audio file.
|
|
|
|
if information.get('filetime') is not None:
|
|
|
|
if information.get('filetime') is not None:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
os.utime(encodeFilename(new_path), (time.time(), information['filetime']))
|
|
|
|
os.utime(encodeFilename(new_path), (time.time(), information['filetime']))
|
|
|
|
except:
|
|
|
|
except Exception:
|
|
|
|
self._downloader.report_warning('Cannot update utime of audio file')
|
|
|
|
self._downloader.report_warning('Cannot update utime of audio file')
|
|
|
|
|
|
|
|
|
|
|
|
information['filepath'] = new_path
|
|
|
|
information['filepath'] = new_path
|
|
|
|