{"action":"created","comment":{"url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls/comments/68433707","id":68433707,"diff_hunk":"@@ -42,12 +42,8 @@ def _initialize_books(self):\n \n         self._books = []\n         for book_id in self._book_ids:\n-            book = Book(self._db, book_id, self._gConnection, self._aConnection, formats=self._formats,\n-                send_to_device=self._send_to_device, create_xray=self._create_xray, proxy=self._proxy,\n-                https_address=self._https_address, https_port=self._https_port)\n-            self._books.append(book)\n-            self._gConnection = book._gConnection\n-            self._aConnection = book._aConnection\n+            self._books.append(Book(self._db, book_id, self._gConnection, self._aConnection, formats=self._formats,\n+                send_to_device=self._send_to_device, create_xray=self._create_xray))\n         \n         self._total_not_failing = 0\n         book_lookup = {}","path":"lib/xray_creator.py","position":14,"original_position":14,"commit_id":"89c7d995442049dfa337e6394eb310d53c334dbd","original_commit_id":"89c7d995442049dfa337e6394eb310d53c334dbd","user":{"login":"stoduk","id":5287714,"avatar_url":"https://avatars.githubusercontent.com/u/5287714?v=3","gravatar_id":"","url":"https://api.github.com/users/stoduk","html_url":"https://github.com/stoduk","followers_url":"https://api.github.com/users/stoduk/followers","following_url":"https://api.github.com/users/stoduk/following{/other_user}","gists_url":"https://api.github.com/users/stoduk/gists{/gist_id}","starred_url":"https://api.github.com/users/stoduk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stoduk/subscriptions","organizations_url":"https://api.github.com/users/stoduk/orgs","repos_url":"https://api.github.com/users/stoduk/repos","events_url":"https://api.github.com/users/stoduk/events{/privacy}","received_events_url":"https://api.github.com/users/stoduk/received_events","type":"User","site_admin":false},"body":"I think there is still more cleanup that could be done.  Book.__init__ is passed the two connections and stores them, yet book.create_xray_event is passing through gConnection, and returning the updated value (which now will never change).  So can remove that return from create_xray_event, and it already has the connection so doesn't need to pass it through.\r\n\r\nSame comments for send_xrays_event.\r\n\r\nGenerally though this looks so much nicer :)","created_at":"2016-06-24T17:41:58Z","updated_at":"2016-06-24T17:41:58Z","html_url":"https://github.com/szarroug3/X-Ray_Calibre_Plugin/pull/54#discussion_r68433707","pull_request_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls/comments/68433707"},"html":{"href":"https://github.com/szarroug3/X-Ray_Calibre_Plugin/pull/54#discussion_r68433707"},"pull_request":{"href":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls/54","id":75122825,"html_url":"https://github.com/szarroug3/X-Ray_Calibre_Plugin/pull/54","diff_url":"https://github.com/szarroug3/X-Ray_Calibre_Plugin/pull/54.diff","patch_url":"https://github.com/szarroug3/X-Ray_Calibre_Plugin/pull/54.patch","issue_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/issues/54","number":54,"state":"open","locked":false,"title":"Dev/samreen bug fixes","user":{"login":"szarroug3","id":8463185,"avatar_url":"https://avatars.githubusercontent.com/u/8463185?v=3","gravatar_id":"","url":"https://api.github.com/users/szarroug3","html_url":"https://github.com/szarroug3","followers_url":"https://api.github.com/users/szarroug3/followers","following_url":"https://api.github.com/users/szarroug3/following{/other_user}","gists_url":"https://api.github.com/users/szarroug3/gists{/gist_id}","starred_url":"https://api.github.com/users/szarroug3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szarroug3/subscriptions","organizations_url":"https://api.github.com/users/szarroug3/orgs","repos_url":"https://api.github.com/users/szarroug3/repos","events_url":"https://api.github.com/users/szarroug3/events{/privacy}","received_events_url":"https://api.github.com/users/szarroug3/received_events","type":"User","site_admin":false},"body":"Fixes #50 - reconnecting using connection.close() then connection.connect() rather than connection.close() then connection = HTTPConnection\r\nFixes #51 - updated to check image file exists before update thumbnail filename; updated variable that no longer existed after device drivers update","created_at":"2016-06-24T14:32:44Z","updated_at":"2016-06-24T17:41:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fdc8ddef4e291f31db9b2139f1fff4ad0d504dea","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls/54/commits","review_comments_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls/54/comments","review_comment_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/issues/54/comments","statuses_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/statuses/89c7d995442049dfa337e6394eb310d53c334dbd","head":{"label":"szarroug3:dev/samreen_bug_fixes","ref":"dev/samreen_bug_fixes","sha":"89c7d995442049dfa337e6394eb310d53c334dbd","user":{"login":"szarroug3","id":8463185,"avatar_url":"https://avatars.githubusercontent.com/u/8463185?v=3","gravatar_id":"","url":"https://api.github.com/users/szarroug3","html_url":"https://github.com/szarroug3","followers_url":"https://api.github.com/users/szarroug3/followers","following_url":"https://api.github.com/users/szarroug3/following{/other_user}","gists_url":"https://api.github.com/users/szarroug3/gists{/gist_id}","starred_url":"https://api.github.com/users/szarroug3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szarroug3/subscriptions","organizations_url":"https://api.github.com/users/szarroug3/orgs","repos_url":"https://api.github.com/users/szarroug3/repos","events_url":"https://api.github.com/users/szarroug3/events{/privacy}","received_events_url":"https://api.github.com/users/szarroug3/received_events","type":"User","site_admin":false},"repo":{"id":55726221,"name":"X-Ray_Calibre_Plugin","full_name":"szarroug3/X-Ray_Calibre_Plugin","owner":{"login":"szarroug3","id":8463185,"avatar_url":"https://avatars.githubusercontent.com/u/8463185?v=3","gravatar_id":"","url":"https://api.github.com/users/szarroug3","html_url":"https://github.com/szarroug3","followers_url":"https://api.github.com/users/szarroug3/followers","following_url":"https://api.github.com/users/szarroug3/following{/other_user}","gists_url":"https://api.github.com/users/szarroug3/gists{/gist_id}","starred_url":"https://api.github.com/users/szarroug3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szarroug3/subscriptions","organizations_url":"https://api.github.com/users/szarroug3/orgs","repos_url":"https://api.github.com/users/szarroug3/repos","events_url":"https://api.github.com/users/szarroug3/events{/privacy}","received_events_url":"https://api.github.com/users/szarroug3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/szarroug3/X-Ray_Calibre_Plugin","description":"X-Ray Creator plugin for Calibre","fork":false,"url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin","forks_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/forks","keys_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/teams","hooks_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/hooks","issue_events_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/issues/events{/number}","events_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/events","assignees_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/assignees{/user}","branches_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/branches{/branch}","tags_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/tags","blobs_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/languages","stargazers_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/stargazers","contributors_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/contributors","subscribers_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/subscribers","subscription_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/subscription","commits_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/contents/{+path}","compare_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/merges","archive_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/downloads","issues_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/issues{/number}","pulls_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/labels{/name}","releases_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/releases{/id}","deployments_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/deployments","created_at":"2016-04-07T20:34:35Z","updated_at":"2016-05-30T21:01:43Z","pushed_at":"2016-06-24T14:32:45Z","git_url":"git://github.com/szarroug3/X-Ray_Calibre_Plugin.git","ssh_url":"git@github.com:szarroug3/X-Ray_Calibre_Plugin.git","clone_url":"https://github.com/szarroug3/X-Ray_Calibre_Plugin.git","svn_url":"https://github.com/szarroug3/X-Ray_Calibre_Plugin","homepage":"http://www.mobileread.com/forums/showthread.php?t=273189","size":17542,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":12,"forks":2,"open_issues":12,"watchers":2,"default_branch":"master"}},"base":{"label":"szarroug3:master","ref":"master","sha":"42b6067b7a289085593eaddf8a6b12054418e40f","user":{"login":"szarroug3","id":8463185,"avatar_url":"https://avatars.githubusercontent.com/u/8463185?v=3","gravatar_id":"","url":"https://api.github.com/users/szarroug3","html_url":"https://github.com/szarroug3","followers_url":"https://api.github.com/users/szarroug3/followers","following_url":"https://api.github.com/users/szarroug3/following{/other_user}","gists_url":"https://api.github.com/users/szarroug3/gists{/gist_id}","starred_url":"https://api.github.com/users/szarroug3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szarroug3/subscriptions","organizations_url":"https://api.github.com/users/szarroug3/orgs","repos_url":"https://api.github.com/users/szarroug3/repos","events_url":"https://api.github.com/users/szarroug3/events{/privacy}","received_events_url":"https://api.github.com/users/szarroug3/received_events","type":"User","site_admin":false},"repo":{"id":55726221,"name":"X-Ray_Calibre_Plugin","full_name":"szarroug3/X-Ray_Calibre_Plugin","owner":{"login":"szarroug3","id":8463185,"avatar_url":"https://avatars.githubusercontent.com/u/8463185?v=3","gravatar_id":"","url":"https://api.github.com/users/szarroug3","html_url":"https://github.com/szarroug3","followers_url":"https://api.github.com/users/szarroug3/followers","following_url":"https://api.github.com/users/szarroug3/following{/other_user}","gists_url":"https://api.github.com/users/szarroug3/gists{/gist_id}","starred_url":"https://api.github.com/users/szarroug3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szarroug3/subscriptions","organizations_url":"https://api.github.com/users/szarroug3/orgs","repos_url":"https://api.github.com/users/szarroug3/repos","events_url":"https://api.github.com/users/szarroug3/events{/privacy}","received_events_url":"https://api.github.com/users/szarroug3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/szarroug3/X-Ray_Calibre_Plugin","description":"X-Ray Creator plugin for Calibre","fork":false,"url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin","forks_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/forks","keys_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/teams","hooks_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/hooks","issue_events_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/issues/events{/number}","events_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/events","assignees_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/assignees{/user}","branches_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/branches{/branch}","tags_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/tags","blobs_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/languages","stargazers_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/stargazers","contributors_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/contributors","subscribers_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/subscribers","subscription_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/subscription","commits_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/contents/{+path}","compare_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/merges","archive_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/downloads","issues_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/issues{/number}","pulls_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/labels{/name}","releases_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/releases{/id}","deployments_url":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/deployments","created_at":"2016-04-07T20:34:35Z","updated_at":"2016-05-30T21:01:43Z","pushed_at":"2016-06-24T14:32:45Z","git_url":"git://github.com/szarroug3/X-Ray_Calibre_Plugin.git","ssh_url":"git@github.com:szarroug3/X-Ray_Calibre_Plugin.git","clone_url":"https://github.com/szarroug3/X-Ray_Calibre_Plugin.git","svn_url":"https://github.com/szarroug3/X-Ray_Calibre_Plugin","homepage":"http://www.mobileread.com/forums/showthread.php?t=273189","size":17542,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":12,"forks":2,"open_issues":12,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls/54"},"html":{"href":"https://github.com/szarroug3/X-Ray_Calibre_Plugin/pull/54"},"issue":{"href":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/issues/54"},"comments":{"href":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/szarroug3/X-Ray_Calibre_Plugin/statuses/89c7d995442049dfa337e6394eb310d53c334dbd"}}}}
{"actor":{"display_login":"stoduk"}}