add song metadata, respond to button requests in media player

This commit is contained in:
Francesco
2025-10-25 14:56:38 +02:00
parent 0461264f16
commit fcce6a8d11
2 changed files with 18 additions and 4 deletions
+4 -2
View File
@@ -903,7 +903,8 @@ class NextPlaybackHandler(AbstractRequestHandler):
"""Handle NextIntent"""
def can_handle(self, handler_input: HandlerInput) -> bool:
return is_intent_name('AMAZON.NextIntent')(handler_input)
return (is_intent_name('AMAZON.NextIntent')(handler_input) or
is_request_type('PlaybackController.NextCommandIssued')(handler_input))
def handle(self, handler_input: HandlerInput) -> Response:
logger.debug('In NextPlaybackHandler')
@@ -920,7 +921,8 @@ class PreviousPlaybackHandler(AbstractRequestHandler):
"""Handle PreviousIntent"""
def can_handle(self, handler_input: HandlerInput) -> bool:
return is_intent_name('AMAZON.PreviousIntent')(handler_input)
return (is_intent_name('AMAZON.PreviousIntent')(handler_input) or
is_request_type('PlaybackController.PreviousCommandIssued')(handler_input))
def handle(self, handler_input: HandlerInput) -> Response:
logger.debug('In PreviousPlaybackHandler')