From 534f56a3e2b064f9124281854ce7f6219c962190 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Sun, 18 Sep 2016 07:57:18 +0200 Subject: [PATCH] Bugfix if ffmpeg is not present on config / Update ha-ffmpeg 0.13 (#3418) --- homeassistant/components/ffmpeg.py | 12 +++++++----- requirements_all.txt | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/ffmpeg.py b/homeassistant/components/ffmpeg.py index 03bf1db885f..0ba015a4660 100644 --- a/homeassistant/components/ffmpeg.py +++ b/homeassistant/components/ffmpeg.py @@ -11,7 +11,7 @@ import voluptuous as vol import homeassistant.helpers.config_validation as cv DOMAIN = 'ffmpeg' -REQUIREMENTS = ["ha-ffmpeg==0.12"] +REQUIREMENTS = ["ha-ffmpeg==0.13"] _LOGGER = logging.getLogger(__name__) @@ -32,15 +32,17 @@ CONFIG_SCHEMA = vol.Schema({ }, extra=vol.ALLOW_EXTRA) -FFMPEG_CONFIG = {} +FFMPEG_CONFIG = { + CONF_FFMPEG_BIN: DEFAULT_BINARY, + CONF_RUN_TEST: DEFAULT_RUN_TEST, +} FFMPEG_TEST_CACHE = {} def setup(hass, config): """Setup the FFmpeg component.""" - global FFMPEG_CONFIG - - FFMPEG_CONFIG = config.get(DOMAIN) + if DOMAIN in config: + FFMPEG_CONFIG.update(config.get(DOMAIN)) return True diff --git a/requirements_all.txt b/requirements_all.txt index 5b4f6073432..ddce3d01a14 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -115,7 +115,7 @@ googlemaps==2.4.4 gps3==0.33.3 # homeassistant.components.ffmpeg -ha-ffmpeg==0.12 +ha-ffmpeg==0.13 # homeassistant.components.mqtt.server hbmqtt==0.7.1