X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=youtube_dl%2Fpostprocessor%2Fffmpeg.py;h=8e99a3c2c461d300dbf077236907e0f80bd16e9b;hb=355c524bfaec10aa8f5ff31bc95d2c50ef1a3113;hp=5ef5e0e545ab498554b9c2eedd115b88a17248e6;hpb=cc55d08832f5008efb56228900a0dbacb428ed7f;p=youtube-dl diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py index 5ef5e0e54..8e99a3c2c 100644 --- a/youtube_dl/postprocessor/ffmpeg.py +++ b/youtube_dl/postprocessor/ffmpeg.py @@ -146,10 +146,7 @@ class FFmpegPostProcessor(PostProcessor): stderr = stderr.decode('utf-8', 'replace') msg = stderr.strip().split('\n')[-1] raise FFmpegPostProcessorError(msg) - try: - os.utime(encodeFilename(out_path), (oldest_mtime, oldest_mtime)) - except Exception: - self._downloader.report_warning('Cannot update utime of file') + self.try_utime(out_path, oldest_mtime, oldest_mtime) if self._deletetempfiles: for ipath in input_paths: @@ -284,10 +281,9 @@ class FFmpegExtractAudioPP(FFmpegPostProcessor): # Try to update the date time for extracted audio file. if information.get('filetime') is not None: - try: - os.utime(encodeFilename(new_path), (time.time(), information['filetime'])) - except Exception: - self._downloader.report_warning('Cannot update utime of audio file') + self.try_utime( + new_path, time.time(), information['filetime'], + errnote='Cannot update utime of audio file') information['filepath'] = new_path return self._nopostoverwrites, information