From: marcelveldt Date: Wed, 16 Oct 2019 07:29:31 +0000 (+0200) Subject: fix config X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=160b9cd1f888acfed4afee77816b7310c50a20e7;p=music-assistant-server.git fix config --- diff --git a/music_assistant/homeassistant.py b/music_assistant/homeassistant.py index de9f8d12..c4b3c5c5 100644 --- a/music_assistant/homeassistant.py +++ b/music_assistant/homeassistant.py @@ -59,7 +59,8 @@ class HomeAssistant(): else: self._use_ssl = False self._host = url.replace('http://','').split('/')[0] - LOGGER.info('Homeassistant integration is enabled') + if self.enabled: + LOGGER.info('Homeassistant integration is enabled') async def setup(self): ''' perform async setup ''' diff --git a/music_assistant/playerproviders/chromecast.py b/music_assistant/playerproviders/chromecast.py index 203dce86..2e9539fc 100644 --- a/music_assistant/playerproviders/chromecast.py +++ b/music_assistant/playerproviders/chromecast.py @@ -23,7 +23,7 @@ PROV_NAME = 'Chromecast' PROV_CLASS = 'ChromecastProvider' CONFIG_ENTRIES = [ - (CONF_ENABLED, False, CONF_ENABLED), + (CONF_ENABLED, True, CONF_ENABLED), ] PLAYER_CONFIG_ENTRIES = [ diff --git a/music_assistant/web/pages/config.vue.js b/music_assistant/web/pages/config.vue.js index c6b5eebf..0cf2bcf7 100755 --- a/music_assistant/web/pages/config.vue.js +++ b/music_assistant/web/pages/config.vue.js @@ -47,24 +47,24 @@ var Config = Vue.component('Config', {
- - - + + - - - + + + - +
- +
@@ -125,16 +125,6 @@ var Config = Vue.component('Config', { console.log("error", error); }); }, - saveConfig () { - axios - .post('/api/config', this.conf) - .then(result => { - console.log(result); - }) - .catch(error => { - console.log("error", error); - }); - }, confChanged(key, subkey, newvalue) { console.log(key + "/" + subkey + " changed!"); console.log(newvalue); @@ -142,11 +132,12 @@ var Config = Vue.component('Config', { .post('/api/config/'+key+'/'+subkey, newvalue) .then(result => { console.log(result); + if (result.data.restart_required) + this.$toasted.show(this.$t('conf.conf_saved')); }) .catch(error => { console.log("error", error); }); - }, getPlayers () { const api_url = '/api/players';