From f740fae2a418ce6c1d229890b48730d257a80dee Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Tue, 17 Feb 2015 17:26:41 +0100 Subject: [PATCH] [ffmpeg] Make available a property --- youtube_dl/YoutubeDL.py | 2 +- youtube_dl/postprocessor/ffmpeg.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index ea2435e0a..a74e73b0c 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -1301,7 +1301,7 @@ class YoutubeDL(object): downloaded = [] success = True merger = FFmpegMergerPP(self, not self.params.get('keepvideo')) - if not merger.available(): + if not merger.available: postprocessors = [] self.report_warning('You have requested multiple ' 'formats but ffmpeg or avconv are not installed.' diff --git a/youtube_dl/postprocessor/ffmpeg.py b/youtube_dl/postprocessor/ffmpeg.py index 16babf6a5..e98fe9834 100644 --- a/youtube_dl/postprocessor/ffmpeg.py +++ b/youtube_dl/postprocessor/ffmpeg.py @@ -34,7 +34,7 @@ class FFmpegPostProcessor(PostProcessor): self._determine_executables() def check_version(self): - if not self.available(): + if not self.available: raise FFmpegPostProcessorError('ffmpeg or avconv not found. Please install one.') required_version = '10-0' if self._uses_avconv() else '1.0' @@ -108,6 +108,7 @@ class FFmpegPostProcessor(PostProcessor): self.probe_basename = p break + @property def available(self): return self.basename is not None