Skip to content
This repository was archived by the owner on Sep 1, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions alexa.py
Original file line number Diff line number Diff line change
Expand Up @@ -2024,9 +2024,11 @@ def alexa_watch_last_show():

# Handle the WatchVideoPlaylist intent.
@ask.intent('WatchVideoPlaylist')
def alexa_watch_video_playlist(VideoPlaylist, shuffle=False):
def alexa_watch_video_playlist(VideoPlaylist, shuffle=False, show=False):
if shuffle:
op = render_template('shuffling_empty').encode("utf-8")
elif show:
op = render_template('showing_empty').encode("utf-8")
else:
op = render_template('playing_empty').encode("utf-8")

Expand All @@ -2046,6 +2048,8 @@ def alexa_watch_video_playlist(VideoPlaylist, shuffle=False):
kodi.ClearVideoPlaylist()
kodi.AddVideosToPlaylist(videos_array, True)
kodi.StartVideoPlaylist()
elif show:
kodi.ViewVideoPlaylist(playlist[0][0])
else:
kodi.PlayerStop()
kodi.StartVideoPlaylist(playlist[0][0])
Expand All @@ -2059,7 +2063,13 @@ def alexa_watch_video_playlist(VideoPlaylist, shuffle=False):
# Handle the ShuffleVideoPlaylist intent.
@ask.intent('ShuffleVideoPlaylist')
def alexa_shuffle_video_playlist(VideoPlaylist):
return alexa_watch_video_playlist(VideoPlaylist, True)
return alexa_watch_video_playlist(VideoPlaylist, True, False)


# Handle the ViewVideoPlaylist intent.
@ask.intent('ViewVideoPlaylist')
def alexa_view_video_playlist(VideoPlaylist):
return alexa_watch_video_playlist(VideoPlaylist, False, True)


# Handle the ShufflePlaylist intent.
Expand Down
9 changes: 9 additions & 0 deletions speech_assets/IntentSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,15 @@
}
]
},
{
"intent": "ViewVideoPlaylist",
"slots": [
{
"name": "VideoPlaylist",
"type": "VIDEOPLAYLISTS"
}
]
},
{
"intent": "ShuffleShow",
"slots": [
Expand Down
Loading