{"action":"created","issue":{"url":"https://api.github.com/repos/mopidy/mopidy-youtube/issues/46","repository_url":"https://api.github.com/repos/mopidy/mopidy-youtube","labels_url":"https://api.github.com/repos/mopidy/mopidy-youtube/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/mopidy/mopidy-youtube/issues/46/comments","events_url":"https://api.github.com/repos/mopidy/mopidy-youtube/issues/46/events","html_url":"https://github.com/mopidy/mopidy-youtube/pull/46","id":107031863,"node_id":"MDExOlB1bGxSZXF1ZXN0NDUzMTcxMjg=","number":46,"title":"performance and usability improvements (ver 3)","user":{"login":"chatziko","id":362089,"node_id":"MDQ6VXNlcjM2MjA4OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/362089?v=4","gravatar_id":"","url":"https://api.github.com/users/chatziko","html_url":"https://github.com/chatziko","followers_url":"https://api.github.com/users/chatziko/followers","following_url":"https://api.github.com/users/chatziko/following{/other_user}","gists_url":"https://api.github.com/users/chatziko/gists{/gist_id}","starred_url":"https://api.github.com/users/chatziko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chatziko/subscriptions","organizations_url":"https://api.github.com/users/chatziko/orgs","repos_url":"https://api.github.com/users/chatziko/repos","events_url":"https://api.github.com/users/chatziko/events{/privacy}","received_events_url":"https://api.github.com/users/chatziko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2015-09-17T17:19:20Z","updated_at":"2018-11-10T06:29:59Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/mopidy/mopidy-youtube/pulls/46","html_url":"https://github.com/mopidy/mopidy-youtube/pull/46","diff_url":"https://github.com/mopidy/mopidy-youtube/pull/46.diff","patch_url":"https://github.com/mopidy/mopidy-youtube/pull/46.patch"},"body":"Hello,\n\nA new version of #31, trying to improve it. This PR has a single commit, the other commits were changes to address some comments, the intermediate states are not useful. I also simplified the code in various places, added comments, etc.\n\nI understand that the diff is big, I cannot split it in multiple PRs cause all changes are connected.\n\nOn the other hand the code is relatively simple. Most changes are in [youtube.py](https://github.com/chatziko/mopidy-youtube/blob/performance-improvements-3/mopidy_youtube/youtube.py) and involve fetching data from youtube (not really mopidy-specific). [backend.py](https://github.com/chatziko/mopidy-youtube/blob/performance-improvements-3/mopidy_youtube/backend.py) is actually much simpler now. So although the diff might look big, going through the whole code can probably be done in less than an hour.\n\nLet me know if I can further simplify things.\n\nOriginal description: I've been hacking modipy-youtube for a few days now trying to make it _fast_ and improve usability. I ended up implementing several improvements (which, in my experience, make a big overall difference): \n- only handle search, allows browsing with no overhead\n- only 2 API calls in search, only takes a couple of secs\n- use the Youtube API for metadata, minimizing the number of calls.\n  pafy (expensive) is only used for playback\n- load data in the background, adding to playing queue is usually instantaneous\n- return playlists in search results\n- separate all API logic in youtube.py, backend.py is quite clean\n\nKostas\n"},"comment":{"url":"https://api.github.com/repos/mopidy/mopidy-youtube/issues/comments/437562356","html_url":"https://github.com/mopidy/mopidy-youtube/pull/46#issuecomment-437562356","issue_url":"https://api.github.com/repos/mopidy/mopidy-youtube/issues/46","id":437562356,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzU2MjM1Ng==","user":{"login":"michael-baker","id":1083622,"node_id":"MDQ6VXNlcjEwODM2MjI=","avatar_url":"https://avatars1.githubusercontent.com/u/1083622?v=4","gravatar_id":"","url":"https://api.github.com/users/michael-baker","html_url":"https://github.com/michael-baker","followers_url":"https://api.github.com/users/michael-baker/followers","following_url":"https://api.github.com/users/michael-baker/following{/other_user}","gists_url":"https://api.github.com/users/michael-baker/gists{/gist_id}","starred_url":"https://api.github.com/users/michael-baker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michael-baker/subscriptions","organizations_url":"https://api.github.com/users/michael-baker/orgs","repos_url":"https://api.github.com/users/michael-baker/repos","events_url":"https://api.github.com/users/michael-baker/events{/privacy}","received_events_url":"https://api.github.com/users/michael-baker/received_events","type":"User","site_admin":false},"created_at":"2018-11-10T06:29:59Z","updated_at":"2018-11-10T06:29:59Z","author_association":"NONE","body":"Works so much better than the original implementation.\r\nI had to supply my own API key and edit the files in /var/lib/mopidy/.local/lib/python2.7/site-packages/mopidy_youtube to merge the changes in.\r\n\r\nFantastic work.\r\n\r\n"}}
{"actor":{"display_login":"michael-baker"}}