pcwii / cpkodi-skill

updated Mycroft.AI Kodi Skill using the Common Play Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support music play queue skip, previous

kbridger opened this issue · comments

I'm loving this skill so thank you so much for putting it together! I'm wondering how hard it would be to support music playl queue commands such as:

  • "play next"/"skip"/"next" --> play next song in play queue. If none, end playback
  • "previous"/"go back" --> play previous song in play queue. If none, restart current song
  • "play again"/"restart" --> restart playback of current song

I'd love to learn more about how to contribute phrases like this and help map them to commands. If there is a doc or example code let me know!

commented

@kbridger, Glad to hear you are using and enjoying the skill. My bandwidth is a little tight at the moment but will certainly add your request to my "todo" list and see if this would be easily implemented.

Was wanting to learn so I checked out the linked Kodi API, and played around with Postman. I managed to get next/previous working through API calls. So I took a look at the python files already there and created this one that mimics one of the other ones.

If this is helpful I can explore a branch/PR... I'm new to contributing code to projects but super happy to help hwoever I can.

This would be the easy part I think. Next would be figuring out how the language recognition works, and how to handle corner cases like when there isn't anything playing, it is the first song and they say previous (currently kodi just seeks back to beginning of the track), etc.

NextPreviousTrack.txt