From 552ed0780ecc4b21558a6cbda08b2a434beb861a Mon Sep 17 00:00:00 2001 From: Martin Kainzbauer Date: Fri, 28 Jul 2017 08:41:23 +0200 Subject: [PATCH] fixed crash in installer when system time isn't set properly (#16), removed legacy comments --- src/main.py | 16 ---------------- src/scripts/install_assistant.sh | 6 ++++++ 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/main.py b/src/main.py index b115ad4b..de55cc1a 100755 --- a/src/main.py +++ b/src/main.py @@ -123,10 +123,6 @@ class Player(object): playlist_last_item = None progressReportRequired = [] - ### - # last_playlist = None - ### - def __init__(self, config, platform, pHandler): # pylint: disable=redefined-outer-name self.config = config self.platform = platform @@ -134,9 +130,6 @@ def __init__(self, config, platform, pHandler): # pylint: disable=redefined-oute self.tunein_parser = tunein.TuneIn(5000) def play_playlist(self, payload): - ### - # self.last_playlist = payload - ### self.navigation_token = payload['navigationToken'] self.playlist_last_item = payload['audioItem']['streams'][-1]['streamId'] @@ -563,15 +556,6 @@ def process_response(response): logger.debug("new volume = %s", volume) - ''' - This causes a deadlock on triggers - ### Resume playing the last station after setting volume - if player.last_playlist is not None: - player.play_playlist(player.last_playlist) - ### - ''' - - # Additional Audio Iten elif 'audioItem' in j['messageBody']: player.play_playlist(j['messageBody']) diff --git a/src/scripts/install_assistant.sh b/src/scripts/install_assistant.sh index cc558f19..9828cea4 100644 --- a/src/scripts/install_assistant.sh +++ b/src/scripts/install_assistant.sh @@ -26,6 +26,12 @@ fi # Will enter here if Directory exists + +# Sync system time to prevent problems while installing pip +sudo systemctl stop ntp +sudo ntpd -gq +sudo systemctl start ntp +# Install pip /opt/AlexaPi/env/bin/pip install pip setuptools --upgrade # Install forked Assistant SDK