From 078bcd5e7dadefc5f897c371e80d2690b51f7118 Mon Sep 17 00:00:00 2001
From: patrick96
Date: Wed, 14 Feb 2018 10:46:56 +0100
Subject: [PATCH] Respect MPD_HOST env variable
Fixes #1007
---
include/modules/mpd.hpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/modules/mpd.hpp b/include/modules/mpd.hpp
index 3e94bee8..d0510338 100644
--- a/include/modules/mpd.hpp
+++ b/include/modules/mpd.hpp
@@ -2,6 +2,7 @@
#include
+#include "utils/env.hpp"
#include "adapters/mpd.hpp"
#include "modules/meta/event_module.hpp"
#include "modules/meta/input_handler.hpp"
@@ -72,7 +73,7 @@ namespace modules {
*/
unique_ptr m_status;
- string m_host{"127.0.0.1"};
+ string m_host{env_util::get("MPD_HOST", "127.0.0.1")};
string m_pass;
unsigned int m_port{6600U};