diff options
author | George Claghorn <george@basecamp.com> | 2018-01-03 22:01:31 -0500 |
---|---|---|
committer | George Claghorn <george@basecamp.com> | 2018-01-03 22:01:31 -0500 |
commit | a72473f0320cc58bea1b47c856c62f015d5da82b (patch) | |
tree | 9c5051a4fbdcac0cd0795022a1769779561c52ae /activestorage/lib/active_storage/analyzer | |
parent | bce675eac49a8673d63ea41991f020aa3aa8c506 (diff) | |
download | rails-a72473f0320cc58bea1b47c856c62f015d5da82b.tar.gz rails-a72473f0320cc58bea1b47c856c62f015d5da82b.tar.bz2 rails-a72473f0320cc58bea1b47c856c62f015d5da82b.zip |
Configure previewer/analyzer command paths centrally
Diffstat (limited to 'activestorage/lib/active_storage/analyzer')
-rw-r--r-- | activestorage/lib/active_storage/analyzer/video_analyzer.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activestorage/lib/active_storage/analyzer/video_analyzer.rb b/activestorage/lib/active_storage/analyzer/video_analyzer.rb index 1c144baa37..09e8605a59 100644 --- a/activestorage/lib/active_storage/analyzer/video_analyzer.rb +++ b/activestorage/lib/active_storage/analyzer/video_analyzer.rb @@ -19,8 +19,6 @@ module ActiveStorage # This analyzer requires the {ffmpeg}[https://www.ffmpeg.org] system library, which is not provided by Rails. You must # install ffmpeg yourself to use this analyzer. class Analyzer::VideoAnalyzer < Analyzer - class_attribute :ffprobe_path, default: "ffprobe" - def self.accept?(blob) blob.video? end @@ -89,5 +87,9 @@ module ActiveStorage logger.info "Skipping video analysis because ffmpeg isn't installed" {} end + + def ffprobe_path + ActiveStorage.paths[:ffprobe] || "ffprobe" + end end end |