Hi All,
When I call the user interface api to start play a certain playlist - like in the below code - the app crash & restart without any clear error log. Any idea what’s wrong ?
[code] case “SetPlaylists”:
self.logger.info(’->set playlists’);
var playlist = req.request.intent.slots.Playlist.value;
var returnedData = self.commandRouter.playListManager.listPlaylist();
returnedData.then(function (data) {
var data_up = data.map(function(x){ return x.toUpperCase() })
var found_index = data_up.indexOf(playlist.toUpperCase() );
if (found_index > -1)
{
//In the array!
self.logger.info('alexa: set playlist to : ', data[found_index]);
var returnedData1 = self.commandRouter.playListManager.playPlaylist(data[found_index]);
client.publish('/volumio','OK, setting playlist to; ' + data[found_index]);
}
else
{
//Not in the array
returnedData.then(function (data) {
self.logger.info('alexa: unknown playlist %s', playlist);
client.publish('/volumio','Sorry, This playlist does not exist');
});
}
});
break;
[/code]
2017-02-01T09:22:02.310Z - info: alexa: message received: {“session”: {“new”: false, “sessionId”: “SessionId.4cfc85bf-5d96-4569-8b89-61eb087b8ac0”, “attributes”: {}, “user”: {“userId”: “amzn1.ask.account.AHUGIRU5L3RO2XRMZWAMOHHL7CSBX7JRZJ25DPHYPWR4FF2BOWCTSF6FVYR2FB2XARVSHHQCC5UTHUGFAN7WLHFUTKIWSM63KENOEI7ZN4WO2DP3AGALVU2S4R22YHHFBTDTNKEW4KJOS35IAC35NTPMOZS7JBEN35U5K4C7OQU2HZ5SXL65DDVA2HBC63YA4CPERID4LZFRYFY”}, “application”: {“applicationId”: “amzn1.ask.skill.40e5102f-69c1-4f24-bf71-d2bcf8241e42”}}, “version”: “1.0”, “request”: {“locale”: “en-US”, “timestamp”: “2017-02-01T09:22:01Z”, “type”: “IntentRequest”, “requestId”: “EdwRequestId.cff2f861-265d-4e3e-9c07-3f86ecb326e0”, “intent”: {“slots”: {“Device”: {“name”: “Device”}, “Playlist”: {“name”: “Playlist”, “value”: “U2”}}, “name”: “SetPlaylists”}}}
2017-02-01T09:22:02.311Z - info: ->set playlists
2017-02-01T09:22:02.311Z - info: [1485940922311] Listing playlists
2017-02-01T09:22:02.312Z - info: alexa: set playlist to : u2
2017-02-01T09:22:02.312Z - info: [1485940922312] Play playlist u2
2017-02-01T09:22:02.315Z - info: CoreCommandRouter::volumioClearQueue
2017-02-01T09:22:02.915Z - info: -------------------------------------------
2017-02-01T09:22:02.918Z - info: ----- Volumio2 ----
2017-02-01T09:22:02.919Z - info: -------------------------------------------
2017-02-01T09:22:02.919Z - info: ----- System startup ----
2017-02-01T09:22:02.919Z - info: -------------------------------------------
2017-02-01T09:22:02.971Z - info: Plugin folders cleanup
2017-02-01T09:22:02.971Z - info: Scanning into folder /volumio/app/plugins/
2017-02-01T09:22:02.971Z - info: Scanning category audio_interface
2017-02-01T09:22:02.972Z - info: Scanning category miscellanea
2017-02-01T09:22:02.972Z - info: Scanning category music_service