{"action":"created","issue":{"url":"https://api.github.com/repos/HSBNE/hsbneportal/issues/39","repository_url":"https://api.github.com/repos/HSBNE/hsbneportal","labels_url":"https://api.github.com/repos/HSBNE/hsbneportal/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/HSBNE/hsbneportal/issues/39/comments","events_url":"https://api.github.com/repos/HSBNE/hsbneportal/issues/39/events","html_url":"https://github.com/HSBNE/hsbneportal/issues/39","id":346433032,"node_id":"MDU6SXNzdWUzNDY0MzMwMzI=","number":39,"title":"Implement theme song system in portal.","user":{"login":"jabelone","id":9560876,"node_id":"MDQ6VXNlcjk1NjA4NzY=","avatar_url":"https://avatars3.githubusercontent.com/u/9560876?v=4","gravatar_id":"","url":"https://api.github.com/users/jabelone","html_url":"https://github.com/jabelone","followers_url":"https://api.github.com/users/jabelone/followers","following_url":"https://api.github.com/users/jabelone/following{/other_user}","gists_url":"https://api.github.com/users/jabelone/gists{/gist_id}","starred_url":"https://api.github.com/users/jabelone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jabelone/subscriptions","organizations_url":"https://api.github.com/users/jabelone/orgs","repos_url":"https://api.github.com/users/jabelone/repos","events_url":"https://api.github.com/users/jabelone/events{/privacy}","received_events_url":"https://api.github.com/users/jabelone/received_events","type":"User","site_admin":false},"labels":[{"id":1001132634,"node_id":"MDU6TGFiZWwxMDAxMTMyNjM0","url":"https://api.github.com/repos/HSBNE/hsbneportal/labels/core%20feature","name":"core feature","color":"fbca04","default":false},{"id":954964618,"node_id":"MDU6TGFiZWw5NTQ5NjQ2MTg=","url":"https://api.github.com/repos/HSBNE/hsbneportal/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-01T03:18:19Z","updated_at":"2018-08-04T09:33:23Z","closed_at":null,"author_association":"COLLABORATOR","body":""},"comment":{"url":"https://api.github.com/repos/HSBNE/hsbneportal/issues/comments/410436875","html_url":"https://github.com/HSBNE/hsbneportal/issues/39#issuecomment-410436875","issue_url":"https://api.github.com/repos/HSBNE/hsbneportal/issues/39","id":410436875,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDQzNjg3NQ==","user":{"login":"sjlongland","id":1710526,"node_id":"MDQ6VXNlcjE3MTA1MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1710526?v=4","gravatar_id":"","url":"https://api.github.com/users/sjlongland","html_url":"https://github.com/sjlongland","followers_url":"https://api.github.com/users/sjlongland/followers","following_url":"https://api.github.com/users/sjlongland/following{/other_user}","gists_url":"https://api.github.com/users/sjlongland/gists{/gist_id}","starred_url":"https://api.github.com/users/sjlongland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjlongland/subscriptions","organizations_url":"https://api.github.com/users/sjlongland/orgs","repos_url":"https://api.github.com/users/sjlongland/repos","events_url":"https://api.github.com/users/sjlongland/events{/privacy}","received_events_url":"https://api.github.com/users/sjlongland/received_events","type":"User","site_admin":false},"created_at":"2018-08-04T09:33:23Z","updated_at":"2018-08-04T09:33:23Z","author_association":"NONE","body":"Just thinking… would this be stored in the SQL database and just dumped out to the spool directory on demand, or would you store the files on-disk?\r\n\r\nI'm thinking something along the lines of:\r\n```\r\nimport subprocess\r\n\r\n# …\r\n\r\ndef filetosln(input_blob, in_format='mp3'):\r\n    \"\"\"\r\n    Convert an MP3 (given as a bytestring) to a SLN (returned as a bytestring)\r\n    \"\"\"\r\n    popen = subprocess.Popen(\r\n        ['/usr/bin/sox', '-t', in_format, '-', '-r', '8000', '-c', '1', '-s', '-w', '-t', 'sln', '-'],\r\n        stdin=subprocess.PIPE, stdout=subprocess.PIPE)\r\n    (sln_data, _) = popen.communicate(stdin=input_blob)\r\n    return sln_data\r\n```\r\n\r\nYou'd probably store both formats so you've got something that's playable… it might be feasible to combine this with [python-magic](https://github.com/ahupp/python-magic) to auto-detect whether it's an MP3, Ogg/Vorbis or whatever."}}
{"actor":{"display_login":"sjlongland"}}