{"action":"created","issue":{"url":"https://api.github.com/repos/sammachin/AlexaPi/issues/20","repository_url":"https://api.github.com/repos/sammachin/AlexaPi","labels_url":"https://api.github.com/repos/sammachin/AlexaPi/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/sammachin/AlexaPi/issues/20/comments","events_url":"https://api.github.com/repos/sammachin/AlexaPi/issues/20/events","html_url":"https://github.com/sammachin/AlexaPi/issues/20","id":139713604,"number":20,"title":"Music","user":{"login":"tube0013","id":11084412,"avatar_url":"https://avatars.githubusercontent.com/u/11084412?v=3","gravatar_id":"","url":"https://api.github.com/users/tube0013","html_url":"https://github.com/tube0013","followers_url":"https://api.github.com/users/tube0013/followers","following_url":"https://api.github.com/users/tube0013/following{/other_user}","gists_url":"https://api.github.com/users/tube0013/gists{/gist_id}","starred_url":"https://api.github.com/users/tube0013/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tube0013/subscriptions","organizations_url":"https://api.github.com/users/tube0013/orgs","repos_url":"https://api.github.com/users/tube0013/repos","events_url":"https://api.github.com/users/tube0013/events{/privacy}","received_events_url":"https://api.github.com/users/tube0013/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":70,"created_at":"2016-03-09T22:00:39Z","updated_at":"2016-04-13T17:46:53Z","closed_at":null,"body":"Is is possible to get Amazon's Music Services working with the script?  Could you use something like ffmpeg or vlc to stream handle the streams?"},"comment":{"url":"https://api.github.com/repos/sammachin/AlexaPi/issues/comments/209564129","html_url":"https://github.com/sammachin/AlexaPi/issues/20#issuecomment-209564129","issue_url":"https://api.github.com/repos/sammachin/AlexaPi/issues/20","id":209564129,"user":{"login":"lennysh","id":1304756,"avatar_url":"https://avatars.githubusercontent.com/u/1304756?v=3","gravatar_id":"","url":"https://api.github.com/users/lennysh","html_url":"https://github.com/lennysh","followers_url":"https://api.github.com/users/lennysh/followers","following_url":"https://api.github.com/users/lennysh/following{/other_user}","gists_url":"https://api.github.com/users/lennysh/gists{/gist_id}","starred_url":"https://api.github.com/users/lennysh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lennysh/subscriptions","organizations_url":"https://api.github.com/users/lennysh/orgs","repos_url":"https://api.github.com/users/lennysh/repos","events_url":"https://api.github.com/users/lennysh/events{/privacy}","received_events_url":"https://api.github.com/users/lennysh/received_events","type":"User","site_admin":false},"created_at":"2016-04-13T17:46:53Z","updated_at":"2016-04-13T17:46:53Z","body":"1. Turn on debug.\r\n2. Replace def play_audio(file) with the following code:\r\n\r\n```\r\ndef play_audio(file):\r\n\tglobal nav_token, p, audioplaying\r\n\tif debug: print(\"{}Play_Audio Request for:{} {}\".format(bcolors.OKBLUE, bcolors.ENDC, file))\r\n\tGPIO.output(24, GPIO.HIGH)\r\n\text = (file.rpartition(\".\")[2])[:3]\r\n\t#subprocess.Popen(['mpg123', '-q', '{}{}'.format(path, file)]).wait()\t\r\n\ti = vlc.Instance('--aout=alsa', '--alsa-audio-device=hw:CARD=ALSA,DEV=0')\r\n\tmrl = \"\"\r\n\tif file == \"response.mp3\" or file == \"hello.mp3\":\r\n\t\tmrl = \"{}{}\".format(path, file)\r\n\telse:\r\n\t\tmrl = \"{}\".format(file)\r\n\t\r\n\tif mrl != \"\":\r\n\t\tm = i.media_new(mrl)\r\n\t\tml = i.media_list_new(mrl)\r\n\t\tm.get_mrl()\r\n\t\tmm = m.event_manager()\r\n\t\t#mm.event_attach(vlc.EventType.MediaPlayerTimeChanged, pos_callback)\r\n\t\t#mm.event_attach(vlc.EventType.MediaParsedChanged, meta_callback, m)\r\n\t\taudioplaying = True\r\n\t\tif ext in playlists:\r\n\t\t\tp = i.media_list_player_new()\r\n\t\t\tp.set_media_list(ml)\r\n\t\t\tif debug: print(\"{}Requesting Playlist...{}\".format(bcolors.OKBLUE, bcolors.ENDC))\r\n\t\telse:\r\n\t\t\tp = i.media_player_new()\r\n\t\t\tp.set_media(m)\r\n\t\t\tif debug: print(\"{}Requesting Stream...{}\".format(bcolors.OKBLUE, bcolors.ENDC))\r\n\t\tmm.event_attach(vlc.EventType.MediaStateChanged, state_callback, p)\r\n\t\tp.audio_set_volume(100)\r\n\t\tp.play()\r\n\t\twhile audioplaying:\r\n\t\t\tcontinue\r\n\t\tGPIO.output(24, GPIO.LOW)\r\n\telse:\r\n\t\tprint(\"(play_audio) mrl = Nothing!\")\r\n```\r\n"}}