- Reordered classes

This commit is contained in:
Ross Stewart
2022-10-22 15:50:38 +01:00
parent e6660bb060
commit 3f7cdabd28

View File

@@ -39,6 +39,7 @@ logger.addHandler(handler)
# Get service configuration
#
logger.info('AskNavidrome 0.6!')
logger.debug('Getting configutration from the environment...')
try:
@@ -572,6 +573,24 @@ class NaviSonicPlayFavouriteSongs(AbstractRequestHandler):
return controller.start_playback('play', speech, card, track_details, handler_input)
class NaviSonicRandomiseQueue(AbstractRequestHandler):
"""Handle NaviSonicRandomiseQueue Intent
Shuffle the current play queue
"""
def can_handle(self, handler_input: HandlerInput) -> bool:
return is_intent_name('NaviSonicRandomiseQueue')(handler_input)
def handle(self, handler_input: HandlerInput) -> Response:
logger.debug('In NaviSonicRandomiseQueue Handler')
play_queue.shuffle()
play_queue.sync()
return handler_input.response_builder.response
class NaviSonicSongDetails(AbstractRequestHandler):
"""Handle NaviSonicSongDetails Intent
@@ -630,25 +649,6 @@ class NaviSonicUnstarSong(AbstractRequestHandler):
return handler_input.response_builder.response
class NaviSonicRandomiseQueue(AbstractRequestHandler):
"""Handle NaviSonicRandomiseQueue Intent
Shuffle the current play queue
"""
def can_handle(self, handler_input: HandlerInput) -> bool:
return is_intent_name('NaviSonicRandomiseQueue')(handler_input)
def handle(self, handler_input: HandlerInput) -> Response:
logger.debug('In NaviSonicRandomiseQueue Handler')
play_queue.shuffle()
play_queue.sync()
return handler_input.response_builder.response
#
# AudioPlayer Handlers
#