{"action":"created","comment":{"url":"https://api.github.com/repos/butterproject/butter-desktop/pulls/comments/66153193","id":66153193,"diff_hunk":"@@ -1,4 +1,6 @@\n // Special Debug Console Calls!\n+var localStorage = window.localStorage || {};","path":"src/app/app.js","position":2,"original_position":2,"commit_id":"a558f748b7c6506c2e542db5cafdad10d1fbb4db","original_commit_id":"8e435a8aecc26d8b7c93a3320b85052723b8917a","user":{"login":"vankasteelj","id":12599850,"avatar_url":"https://avatars.githubusercontent.com/u/12599850?v=3","gravatar_id":"","url":"https://api.github.com/users/vankasteelj","html_url":"https://github.com/vankasteelj","followers_url":"https://api.github.com/users/vankasteelj/followers","following_url":"https://api.github.com/users/vankasteelj/following{/other_user}","gists_url":"https://api.github.com/users/vankasteelj/gists{/gist_id}","starred_url":"https://api.github.com/users/vankasteelj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vankasteelj/subscriptions","organizations_url":"https://api.github.com/users/vankasteelj/orgs","repos_url":"https://api.github.com/users/vankasteelj/repos","events_url":"https://api.github.com/users/vankasteelj/events{/privacy}","received_events_url":"https://api.github.com/users/vankasteelj/received_events","type":"User","site_admin":false},"body":"If you're 100% sure it won't destroy localStorage for the entire session if it fails to init, I don't see a problem, but from the outside, it looks like (if there's a fail) you replace the global variable by a volatile object that won't be saved on exit, hence that won't be available for next session. So maybe you should add in the try/catch of win.close() a `window.localStorage = localStorage` to make sure the modifications to localStorage are saved if localStorage is available AFTER the app started. Dunno if I make sense ? :p ","created_at":"2016-06-07T21:08:47Z","updated_at":"2016-06-07T21:08:47Z","html_url":"https://github.com/butterproject/butter-desktop/pull/406#discussion_r66153193","pull_request_url":"https://api.github.com/repos/butterproject/butter-desktop/pulls/406","_links":{"self":{"href":"https://api.github.com/repos/butterproject/butter-desktop/pulls/comments/66153193"},"html":{"href":"https://github.com/butterproject/butter-desktop/pull/406#discussion_r66153193"},"pull_request":{"href":"https://api.github.com/repos/butterproject/butter-desktop/pulls/406"}}},"pull_request":{"url":"https://api.github.com/repos/butterproject/butter-desktop/pulls/406","id":72103714,"html_url":"https://github.com/butterproject/butter-desktop/pull/406","diff_url":"https://github.com/butterproject/butter-desktop/pull/406.diff","patch_url":"https://github.com/butterproject/butter-desktop/pull/406.patch","issue_url":"https://api.github.com/repos/butterproject/butter-desktop/issues/406","number":406,"state":"open","locked":false,"title":"Xaiki/audio dropdown","user":{"login":"xaiki","id":127133,"avatar_url":"https://avatars.githubusercontent.com/u/127133?v=3","gravatar_id":"","url":"https://api.github.com/users/xaiki","html_url":"https://github.com/xaiki","followers_url":"https://api.github.com/users/xaiki/followers","following_url":"https://api.github.com/users/xaiki/following{/other_user}","gists_url":"https://api.github.com/users/xaiki/gists{/gist_id}","starred_url":"https://api.github.com/users/xaiki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xaiki/subscriptions","organizations_url":"https://api.github.com/users/xaiki/orgs","repos_url":"https://api.github.com/users/xaiki/repos","events_url":"https://api.github.com/users/xaiki/events{/privacy}","received_events_url":"https://api.github.com/users/xaiki/received_events","type":"User","site_admin":false},"body":"this opens the posibility to have providers defining audio as well as subs, it's WIP as the provider API will require at least a new method (selectStream), that will actually allow us to move some logic that should not be in generic code into the provider (like quality selection)\r\n\r\nflow will be something like:\r\nprovider (declare selectable) -> generic code (presents selectable) -> provider (select stream)\r\n\r\nbut it's already a nice refactor of the sub code as it is.\r\n","created_at":"2016-05-31T23:49:45Z","updated_at":"2016-06-07T21:08:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d0986438ff367015abe9948a2d5339e242425ee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/butterproject/butter-desktop/pulls/406/commits","review_comments_url":"https://api.github.com/repos/butterproject/butter-desktop/pulls/406/comments","review_comment_url":"https://api.github.com/repos/butterproject/butter-desktop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/butterproject/butter-desktop/issues/406/comments","statuses_url":"https://api.github.com/repos/butterproject/butter-desktop/statuses/a558f748b7c6506c2e542db5cafdad10d1fbb4db","head":{"label":"butterproject:xaiki/audio-dropdown","ref":"xaiki/audio-dropdown","sha":"a558f748b7c6506c2e542db5cafdad10d1fbb4db","user":{"login":"butterproject","id":15199200,"avatar_url":"https://avatars.githubusercontent.com/u/15199200?v=3","gravatar_id":"","url":"https://api.github.com/users/butterproject","html_url":"https://github.com/butterproject","followers_url":"https://api.github.com/users/butterproject/followers","following_url":"https://api.github.com/users/butterproject/following{/other_user}","gists_url":"https://api.github.com/users/butterproject/gists{/gist_id}","starred_url":"https://api.github.com/users/butterproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/butterproject/subscriptions","organizations_url":"https://api.github.com/users/butterproject/orgs","repos_url":"https://api.github.com/users/butterproject/repos","events_url":"https://api.github.com/users/butterproject/events{/privacy}","received_events_url":"https://api.github.com/users/butterproject/received_events","type":"Organization","site_admin":false},"repo":{"id":44559230,"name":"butter-desktop","full_name":"butterproject/butter-desktop","owner":{"login":"butterproject","id":15199200,"avatar_url":"https://avatars.githubusercontent.com/u/15199200?v=3","gravatar_id":"","url":"https://api.github.com/users/butterproject","html_url":"https://github.com/butterproject","followers_url":"https://api.github.com/users/butterproject/followers","following_url":"https://api.github.com/users/butterproject/following{/other_user}","gists_url":"https://api.github.com/users/butterproject/gists{/gist_id}","starred_url":"https://api.github.com/users/butterproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/butterproject/subscriptions","organizations_url":"https://api.github.com/users/butterproject/orgs","repos_url":"https://api.github.com/users/butterproject/repos","events_url":"https://api.github.com/users/butterproject/events{/privacy}","received_events_url":"https://api.github.com/users/butterproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/butterproject/butter-desktop","description":"All the free parts of what used to be Popcorn Time","fork":false,"url":"https://api.github.com/repos/butterproject/butter-desktop","forks_url":"https://api.github.com/repos/butterproject/butter-desktop/forks","keys_url":"https://api.github.com/repos/butterproject/butter-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/butterproject/butter-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/butterproject/butter-desktop/teams","hooks_url":"https://api.github.com/repos/butterproject/butter-desktop/hooks","issue_events_url":"https://api.github.com/repos/butterproject/butter-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/butterproject/butter-desktop/events","assignees_url":"https://api.github.com/repos/butterproject/butter-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/butterproject/butter-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/butterproject/butter-desktop/tags","blobs_url":"https://api.github.com/repos/butterproject/butter-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/butterproject/butter-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/butterproject/butter-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/butterproject/butter-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/butterproject/butter-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/butterproject/butter-desktop/languages","stargazers_url":"https://api.github.com/repos/butterproject/butter-desktop/stargazers","contributors_url":"https://api.github.com/repos/butterproject/butter-desktop/contributors","subscribers_url":"https://api.github.com/repos/butterproject/butter-desktop/subscribers","subscription_url":"https://api.github.com/repos/butterproject/butter-desktop/subscription","commits_url":"https://api.github.com/repos/butterproject/butter-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/butterproject/butter-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/butterproject/butter-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/butterproject/butter-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/butterproject/butter-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/butterproject/butter-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/butterproject/butter-desktop/merges","archive_url":"https://api.github.com/repos/butterproject/butter-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/butterproject/butter-desktop/downloads","issues_url":"https://api.github.com/repos/butterproject/butter-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/butterproject/butter-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/butterproject/butter-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/butterproject/butter-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/butterproject/butter-desktop/labels{/name}","releases_url":"https://api.github.com/repos/butterproject/butter-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/butterproject/butter-desktop/deployments","created_at":"2015-10-19T19:42:42Z","updated_at":"2016-06-07T07:49:02Z","pushed_at":"2016-06-07T01:13:29Z","git_url":"git://github.com/butterproject/butter-desktop.git","ssh_url":"git@github.com:butterproject/butter-desktop.git","clone_url":"https://github.com/butterproject/butter-desktop.git","svn_url":"https://github.com/butterproject/butter-desktop","homepage":"http://butterproject.org/","size":40966,"stargazers_count":3535,"watchers_count":3535,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":590,"mirror_url":null,"open_issues_count":44,"forks":590,"open_issues":44,"watchers":3535,"default_branch":"master"}},"base":{"label":"butterproject:master","ref":"master","sha":"e3da5178159c9904153e1dbb108c7b735e61f953","user":{"login":"butterproject","id":15199200,"avatar_url":"https://avatars.githubusercontent.com/u/15199200?v=3","gravatar_id":"","url":"https://api.github.com/users/butterproject","html_url":"https://github.com/butterproject","followers_url":"https://api.github.com/users/butterproject/followers","following_url":"https://api.github.com/users/butterproject/following{/other_user}","gists_url":"https://api.github.com/users/butterproject/gists{/gist_id}","starred_url":"https://api.github.com/users/butterproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/butterproject/subscriptions","organizations_url":"https://api.github.com/users/butterproject/orgs","repos_url":"https://api.github.com/users/butterproject/repos","events_url":"https://api.github.com/users/butterproject/events{/privacy}","received_events_url":"https://api.github.com/users/butterproject/received_events","type":"Organization","site_admin":false},"repo":{"id":44559230,"name":"butter-desktop","full_name":"butterproject/butter-desktop","owner":{"login":"butterproject","id":15199200,"avatar_url":"https://avatars.githubusercontent.com/u/15199200?v=3","gravatar_id":"","url":"https://api.github.com/users/butterproject","html_url":"https://github.com/butterproject","followers_url":"https://api.github.com/users/butterproject/followers","following_url":"https://api.github.com/users/butterproject/following{/other_user}","gists_url":"https://api.github.com/users/butterproject/gists{/gist_id}","starred_url":"https://api.github.com/users/butterproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/butterproject/subscriptions","organizations_url":"https://api.github.com/users/butterproject/orgs","repos_url":"https://api.github.com/users/butterproject/repos","events_url":"https://api.github.com/users/butterproject/events{/privacy}","received_events_url":"https://api.github.com/users/butterproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/butterproject/butter-desktop","description":"All the free parts of what used to be Popcorn Time","fork":false,"url":"https://api.github.com/repos/butterproject/butter-desktop","forks_url":"https://api.github.com/repos/butterproject/butter-desktop/forks","keys_url":"https://api.github.com/repos/butterproject/butter-desktop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/butterproject/butter-desktop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/butterproject/butter-desktop/teams","hooks_url":"https://api.github.com/repos/butterproject/butter-desktop/hooks","issue_events_url":"https://api.github.com/repos/butterproject/butter-desktop/issues/events{/number}","events_url":"https://api.github.com/repos/butterproject/butter-desktop/events","assignees_url":"https://api.github.com/repos/butterproject/butter-desktop/assignees{/user}","branches_url":"https://api.github.com/repos/butterproject/butter-desktop/branches{/branch}","tags_url":"https://api.github.com/repos/butterproject/butter-desktop/tags","blobs_url":"https://api.github.com/repos/butterproject/butter-desktop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/butterproject/butter-desktop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/butterproject/butter-desktop/git/refs{/sha}","trees_url":"https://api.github.com/repos/butterproject/butter-desktop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/butterproject/butter-desktop/statuses/{sha}","languages_url":"https://api.github.com/repos/butterproject/butter-desktop/languages","stargazers_url":"https://api.github.com/repos/butterproject/butter-desktop/stargazers","contributors_url":"https://api.github.com/repos/butterproject/butter-desktop/contributors","subscribers_url":"https://api.github.com/repos/butterproject/butter-desktop/subscribers","subscription_url":"https://api.github.com/repos/butterproject/butter-desktop/subscription","commits_url":"https://api.github.com/repos/butterproject/butter-desktop/commits{/sha}","git_commits_url":"https://api.github.com/repos/butterproject/butter-desktop/git/commits{/sha}","comments_url":"https://api.github.com/repos/butterproject/butter-desktop/comments{/number}","issue_comment_url":"https://api.github.com/repos/butterproject/butter-desktop/issues/comments{/number}","contents_url":"https://api.github.com/repos/butterproject/butter-desktop/contents/{+path}","compare_url":"https://api.github.com/repos/butterproject/butter-desktop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/butterproject/butter-desktop/merges","archive_url":"https://api.github.com/repos/butterproject/butter-desktop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/butterproject/butter-desktop/downloads","issues_url":"https://api.github.com/repos/butterproject/butter-desktop/issues{/number}","pulls_url":"https://api.github.com/repos/butterproject/butter-desktop/pulls{/number}","milestones_url":"https://api.github.com/repos/butterproject/butter-desktop/milestones{/number}","notifications_url":"https://api.github.com/repos/butterproject/butter-desktop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/butterproject/butter-desktop/labels{/name}","releases_url":"https://api.github.com/repos/butterproject/butter-desktop/releases{/id}","deployments_url":"https://api.github.com/repos/butterproject/butter-desktop/deployments","created_at":"2015-10-19T19:42:42Z","updated_at":"2016-06-07T07:49:02Z","pushed_at":"2016-06-07T01:13:29Z","git_url":"git://github.com/butterproject/butter-desktop.git","ssh_url":"git@github.com:butterproject/butter-desktop.git","clone_url":"https://github.com/butterproject/butter-desktop.git","svn_url":"https://github.com/butterproject/butter-desktop","homepage":"http://butterproject.org/","size":40966,"stargazers_count":3535,"watchers_count":3535,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":590,"mirror_url":null,"open_issues_count":44,"forks":590,"open_issues":44,"watchers":3535,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/butterproject/butter-desktop/pulls/406"},"html":{"href":"https://github.com/butterproject/butter-desktop/pull/406"},"issue":{"href":"https://api.github.com/repos/butterproject/butter-desktop/issues/406"},"comments":{"href":"https://api.github.com/repos/butterproject/butter-desktop/issues/406/comments"},"review_comments":{"href":"https://api.github.com/repos/butterproject/butter-desktop/pulls/406/comments"},"review_comment":{"href":"https://api.github.com/repos/butterproject/butter-desktop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/butterproject/butter-desktop/pulls/406/commits"},"statuses":{"href":"https://api.github.com/repos/butterproject/butter-desktop/statuses/a558f748b7c6506c2e542db5cafdad10d1fbb4db"}}}}
{"actor":{"display_login":"vankasteelj"}}