From 67e8d95b6f981675a22c23447ad58430e270bd98 Mon Sep 17 00:00:00 2001 From: Joe Ipson Date: Sat, 28 Jul 2018 14:55:28 -0600 Subject: [PATCH] Update alexa.py Changed the way the kodi-voice library worked. It'll always provide a default of english now. --- alexa.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/alexa.py b/alexa.py index aed9b44..09aa6cf 100644 --- a/alexa.py +++ b/alexa.py @@ -44,14 +44,13 @@ app.config['ASK_APPLICATION_ID'] = os.getenv('MEDIA_CENTER_SKILL_ID') LANGUAGE = config.get('global', 'language') -if !LANGUAGE or LANGUAGE == 'None': - LANGUAGE = 'en' -if LANGUAGE == 'en': - TEMPLATE_FILE = "templates.en.yaml" -elif LANGUAGE == 'de': +if LANGUAGE == 'de': TEMPLATE_FILE = "templates.de.yaml" elif LANGUAGE == 'fr': TEMPLATE_FILE = "templates.fr.yaml" +else: + LANGUAGE = 'en' + TEMPLATE_FILE = "templates.en.yaml" # According to this: https://alexatutorial.com/flask-ask/configuration.html # Timestamp based verification shouldn't be used in production. Use at own risk