From 384c66cbd23c0488097473d77650c17ba25c0809 Mon Sep 17 00:00:00 2001 From: "Matthew D. Scholefield" Date: Wed, 1 Nov 2017 16:47:01 -0500 Subject: [PATCH] Fix active skills for Padatious --- mycroft/skills/main.py | 4 ++-- mycroft/skills/padatious_service.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mycroft/skills/main.py b/mycroft/skills/main.py index f1ea0347d2..561b1099e2 100644 --- a/mycroft/skills/main.py +++ b/mycroft/skills/main.py @@ -74,8 +74,8 @@ def _starting_up(): # Create the Intent manager, which converts utterances to intents # This is the heart of the voice invoked skill system - PadatiousService(ws) - IntentService(ws) + service = IntentService(ws) + PadatiousService(ws, service) event_scheduler = EventScheduler(ws) # Create a thread that monitors the loaded skills, looking for updates diff --git a/mycroft/skills/padatious_service.py b/mycroft/skills/padatious_service.py index 31de1e55a3..a11464a942 100644 --- a/mycroft/skills/padatious_service.py +++ b/mycroft/skills/padatious_service.py @@ -29,9 +29,10 @@ PADATIOUS_VERSION = '0.3.6' # Also update in requirements.txt class PadatiousService(FallbackSkill): - def __init__(self, emitter): + def __init__(self, emitter, service): FallbackSkill.__init__(self) self.config = Configuration.get()['padatious'] + self.service = service intent_cache = expanduser(self.config['intent_cache']) try: @@ -110,5 +111,7 @@ class PadatiousService(FallbackSkill): data.matches['utterance'] = utt + self.service.add_active_skill(int(data.name.split(':')[0])) + self.emitter.emit(Message(data.name, data=data.matches)) return True