m0ngr31 / kanzi

Alexa skill for controlling Kodi
https://lexigr.am
MIT License
428 stars 149 forks source link

Have "Pause", "Resume", "Halt" really been working? #272

Closed rprior04938 closed 6 years ago

rprior04938 commented 6 years ago

I've been playing with Kodi and Alexa for perhaps 6 months and haven't been able to get the Pause/Resume and Halt intents to work until now. I've now discovered that there seem to be identical bugs in alexa.py, namely the lack of the preface

@ask.intent('Stop') @preflight_check

before

def alexa_stop_cancel(kodi):

and

@ask.intent('PlayPause') @preflight_check

before

def alexa_play_pause(kodi):

Making these corrections to alexa.py is a little tricky if you're using m0ngr31's kanzi lexigram, as alexa.py is imported and zipped for you. You'll need to do the import and zip, then pull the alexa.py out of the zipped file, make the edits and then reinsert it into the zip file before importing it to AWS Lambda.

Rod

@ask.intent('Stop') @preflight_check

before

def alexa_stop_cancel(kodi):

jingai commented 6 years ago

alexa_stop_cancel() and alexa_play_pause() are not directly called by any Intent. Further, the Intents in question are AMAZON.StopIntent, AMAZON.CancelIntent, AMAZON.PauseIntent, and AMAZON.ResumeIntent. I'm not really sure where you're getting Stop and PlayPause.

For me, it has always worked the way it currently is on two different installations. Just asked the Kodi skill to 'pause,' 'resume,' and 'stop' -- all worked fine.

Do note that because these are such short phrases, she does often have trouble hearing them over the audio from the media playing. But they're not fundamentally broken or anything.

rprior04938 commented 6 years ago

Thanks much for the prompt and direct reply.

The custom skill that I’ve been using is left over from your older Kodi system that I downloaded and followed around 8 months ago. It has custom Stop, Pause, and Resume intents in it. The Amazon built-in intents are also included. However, if the Alexa.py intents you list don’t contain the header information I’ve shown, the intents don’t work for me and never have. I’ll try to remove the custom intents and see what happens.

Rod

From: jingai [mailto:notifications@github.com] Sent: Sunday, August 19, 2018 5:37 PM To: m0ngr31/kanzi kanzi@noreply.github.com Cc: rprior04938 rprior04938@gmail.com; Author author@noreply.github.com Subject: Re: [m0ngr31/kanzi] Have "Pause", "Resume", "Halt" really been working? (#272)

alexa_stop_cancel() and alexa_play_pause() are not directly called by any Intent. Further, the Intents in question are AMAZON.StopIntent, AMAZON.CancelIntent, AMAZON.PauseIntent, and AMAZON.ResumeIntent. I'm not really sure where you're getting Stop and PlayPause.

For me, it has always worked the way it currently is on two different installations. Just asked the Kodi skill to 'pause,' 'resume,' and 'stop' -- all worked fine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/m0ngr31/kanzi/issues/272#issuecomment-414157728 , or mute the thread https://github.com/notifications/unsubscribe-auth/Agu44HLLXIW8Z8aO5KsjKONpgReUF1dTks5uSdqJgaJpZM4WDHqM . https://github.com/notifications/beacon/Agu44LgbT--hFoWaZJIe2TjfSi91pszCks5uSdqJgaJpZM4WDHqM.gif

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient

Virus-free. http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient www.avg.com

jingai commented 6 years ago

What you're doing isn't right, though. You really should update to the latest release. We can't really support modified old releases.