{"action":"created","comment":{"url":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls/comments/29130390","id":29130390,"diff_hunk":"@@ -166,44 +249,65 @@ def upload_progress(value, max):\n                 progress.setLabelText('Processing...')\n \n         def upload_canceled():\n+            self.reply.abort()\n             self.reply = None\n             self.status_info_label.setText('Cancelled')\n+            self.set_upload_btn_state('publish')\n+            self.manager.clear_tmp_files()\n \n         def ssl_errors(err_list):\n             for err in err_list:\n                 print(err.errorString())\n             self.reply.ignoreSslErrors()\n \n+        ## Connections\n         self.reply.finished.connect(upload_finished)\n         self.reply.error.connect(upload_error)\n         self.reply.uploadProgress.connect(upload_progress)\n         self.reply.sslErrors.connect(ssl_errors)\n+        progress.canceled.connect(upload_canceled)\n \n-    def search_game_directory(self):\n-        dialog = QtGui.QFileDialog()\n-        dialog.setFileMode(QtGui.QFileDialog.Directory)\n-        dialog.setOption(QtGui.QFileDialog.ShowDirsOnly)\n-        self.update_game_gui(dialog.getExistingDirectory())\n-\n-\n-    def update_game_gui(self, game_dir):\n-        if os.path.exists(game_dir):\n-            self.game_dir = game_dir\n-            self.game_path_tb = self.game_dir\n-            self.game_path_info_label.setText('Found')\n-            print(self.game_dir)\n-            self.manager = KSP2Skfb(str(self.game_dir))\n-            self.craft_list = []\n-            self.craft_list_ql.clear()\n-            self.craft_list = self.manager.get_craft_list()\n-            self.craft_list_ql.addItems(self.craft_list)\n+    def enable_skfb_ui(self, bool_value):\n+        self.api_token_tb.setEnabled(bool_value)\n+        self.name_tb.setEnabled(bool_value)\n+        self.description_tb.setEnabled(bool_value)\n+        self.tags_tb.setEnabled(bool_value)\n \n+    def set_craft_list(self):\n+        self.craft_list = []\n+        self.craft_list_ql.clear()\n+        self.craft_list = self.manager.get_craft_list()\n         if self.craft_list:\n+            self.craft_list_ql.addItems(self.craft_list)\n             self.craft_list_ql.setEnabled(True)\n-            self.upload_btn.setEnabled(True)\n-            self.game_dir_btn.setEnabled(False)\n+\n+        return self.craft_list\n+\n+    def update_game_ui(self, game_dir):\n+        ''' Check if the game dir exists and if it contains crafts'''\n+        self.game_dir = game_dir\n+        self.game_path_tb.setText(self.game_dir)\n+        if os.path.exists(game_dir):\n+            self.manager.set_game_dir(str(game_dir))","path":"gui.py","position":383,"original_position":383,"commit_id":"a40b8a09acf06673aed292df95e3cacd71acb8c0","original_commit_id":"a40b8a09acf06673aed292df95e3cacd71acb8c0","user":{"login":"mrchlblng","id":628701,"avatar_url":"https://avatars.githubusercontent.com/u/628701?v=3","gravatar_id":"","url":"https://api.github.com/users/mrchlblng","html_url":"https://github.com/mrchlblng","followers_url":"https://api.github.com/users/mrchlblng/followers","following_url":"https://api.github.com/users/mrchlblng/following{/other_user}","gists_url":"https://api.github.com/users/mrchlblng/gists{/gist_id}","starred_url":"https://api.github.com/users/mrchlblng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrchlblng/subscriptions","organizations_url":"https://api.github.com/users/mrchlblng/orgs","repos_url":"https://api.github.com/users/mrchlblng/repos","events_url":"https://api.github.com/users/mrchlblng/events{/privacy}","received_events_url":"https://api.github.com/users/mrchlblng/received_events","type":"User","site_admin":false},"body":"shouldn't `str(game_dir)` be `to_utf8(game_dir)`?","created_at":"2015-04-27T09:01:04Z","updated_at":"2015-04-27T09:01:04Z","html_url":"https://github.com/sketchfab/ksp-exporter/pull/1#discussion_r29130390","pull_request_url":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls/comments/29130390"},"html":{"href":"https://github.com/sketchfab/ksp-exporter/pull/1#discussion_r29130390"},"pull_request":{"href":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls/1","id":33243263,"html_url":"https://github.com/sketchfab/ksp-exporter/pull/1","diff_url":"https://github.com/sketchfab/ksp-exporter/pull/1.diff","patch_url":"https://github.com/sketchfab/ksp-exporter/pull/1.patch","issue_url":"https://api.github.com/repos/sketchfab/ksp-exporter/issues/1","number":1,"state":"open","locked":false,"title":"Feature/select files zip 91768006","user":{"login":"AurL","id":4066133,"avatar_url":"https://avatars.githubusercontent.com/u/4066133?v=3","gravatar_id":"","url":"https://api.github.com/users/AurL","html_url":"https://github.com/AurL","followers_url":"https://api.github.com/users/AurL/followers","following_url":"https://api.github.com/users/AurL/following{/other_user}","gists_url":"https://api.github.com/users/AurL/gists{/gist_id}","starred_url":"https://api.github.com/users/AurL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AurL/subscriptions","organizations_url":"https://api.github.com/users/AurL/orgs","repos_url":"https://api.github.com/users/AurL/repos","events_url":"https://api.github.com/users/AurL/events{/privacy}","received_events_url":"https://api.github.com/users/AurL/received_events","type":"User","site_admin":false},"body":"Craft archive are more accurately built :\r\n* Only useful files are added\r\n* Converts (by default) MBM into PNGs (option to disable it)\r\n* Height maps to normal maps conversion ","created_at":"2015-04-14T10:10:17Z","updated_at":"2015-04-27T09:01:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa264fa65eb1607fa8870957e8dc533c2fd802e4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls/1/commits","review_comments_url":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls/1/comments","review_comment_url":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sketchfab/ksp-exporter/issues/1/comments","statuses_url":"https://api.github.com/repos/sketchfab/ksp-exporter/statuses/a40b8a09acf06673aed292df95e3cacd71acb8c0","head":{"label":"sketchfab:feature/select-files-zip_91768006","ref":"feature/select-files-zip_91768006","sha":"a40b8a09acf06673aed292df95e3cacd71acb8c0","user":{"login":"sketchfab","id":2936542,"avatar_url":"https://avatars.githubusercontent.com/u/2936542?v=3","gravatar_id":"","url":"https://api.github.com/users/sketchfab","html_url":"https://github.com/sketchfab","followers_url":"https://api.github.com/users/sketchfab/followers","following_url":"https://api.github.com/users/sketchfab/following{/other_user}","gists_url":"https://api.github.com/users/sketchfab/gists{/gist_id}","starred_url":"https://api.github.com/users/sketchfab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sketchfab/subscriptions","organizations_url":"https://api.github.com/users/sketchfab/orgs","repos_url":"https://api.github.com/users/sketchfab/repos","events_url":"https://api.github.com/users/sketchfab/events{/privacy}","received_events_url":"https://api.github.com/users/sketchfab/received_events","type":"Organization","site_admin":false},"repo":{"id":33258673,"name":"ksp-exporter","full_name":"sketchfab/ksp-exporter","owner":{"login":"sketchfab","id":2936542,"avatar_url":"https://avatars.githubusercontent.com/u/2936542?v=3","gravatar_id":"","url":"https://api.github.com/users/sketchfab","html_url":"https://github.com/sketchfab","followers_url":"https://api.github.com/users/sketchfab/followers","following_url":"https://api.github.com/users/sketchfab/following{/other_user}","gists_url":"https://api.github.com/users/sketchfab/gists{/gist_id}","starred_url":"https://api.github.com/users/sketchfab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sketchfab/subscriptions","organizations_url":"https://api.github.com/users/sketchfab/orgs","repos_url":"https://api.github.com/users/sketchfab/repos","events_url":"https://api.github.com/users/sketchfab/events{/privacy}","received_events_url":"https://api.github.com/users/sketchfab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sketchfab/ksp-exporter","description":"","fork":false,"url":"https://api.github.com/repos/sketchfab/ksp-exporter","forks_url":"https://api.github.com/repos/sketchfab/ksp-exporter/forks","keys_url":"https://api.github.com/repos/sketchfab/ksp-exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sketchfab/ksp-exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sketchfab/ksp-exporter/teams","hooks_url":"https://api.github.com/repos/sketchfab/ksp-exporter/hooks","issue_events_url":"https://api.github.com/repos/sketchfab/ksp-exporter/issues/events{/number}","events_url":"https://api.github.com/repos/sketchfab/ksp-exporter/events","assignees_url":"https://api.github.com/repos/sketchfab/ksp-exporter/assignees{/user}","branches_url":"https://api.github.com/repos/sketchfab/ksp-exporter/branches{/branch}","tags_url":"https://api.github.com/repos/sketchfab/ksp-exporter/tags","blobs_url":"https://api.github.com/repos/sketchfab/ksp-exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sketchfab/ksp-exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sketchfab/ksp-exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/sketchfab/ksp-exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sketchfab/ksp-exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/sketchfab/ksp-exporter/languages","stargazers_url":"https://api.github.com/repos/sketchfab/ksp-exporter/stargazers","contributors_url":"https://api.github.com/repos/sketchfab/ksp-exporter/contributors","subscribers_url":"https://api.github.com/repos/sketchfab/ksp-exporter/subscribers","subscription_url":"https://api.github.com/repos/sketchfab/ksp-exporter/subscription","commits_url":"https://api.github.com/repos/sketchfab/ksp-exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/sketchfab/ksp-exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/sketchfab/ksp-exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/sketchfab/ksp-exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/sketchfab/ksp-exporter/contents/{+path}","compare_url":"https://api.github.com/repos/sketchfab/ksp-exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sketchfab/ksp-exporter/merges","archive_url":"https://api.github.com/repos/sketchfab/ksp-exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sketchfab/ksp-exporter/downloads","issues_url":"https://api.github.com/repos/sketchfab/ksp-exporter/issues{/number}","pulls_url":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/sketchfab/ksp-exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/sketchfab/ksp-exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sketchfab/ksp-exporter/labels{/name}","releases_url":"https://api.github.com/repos/sketchfab/ksp-exporter/releases{/id}","created_at":"2015-04-01T16:22:27Z","updated_at":"2015-04-01T17:29:26Z","pushed_at":"2015-04-27T07:53:04Z","git_url":"git://github.com/sketchfab/ksp-exporter.git","ssh_url":"git@github.com:sketchfab/ksp-exporter.git","clone_url":"https://github.com/sketchfab/ksp-exporter.git","svn_url":"https://github.com/sketchfab/ksp-exporter","homepage":null,"size":33012,"stargazers_count":0,"watchers_count":0,"language":"Tcl","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"sketchfab:master","ref":"master","sha":"e08d41bf73493db7a35b6ca13edd5a3004fb4471","user":{"login":"sketchfab","id":2936542,"avatar_url":"https://avatars.githubusercontent.com/u/2936542?v=3","gravatar_id":"","url":"https://api.github.com/users/sketchfab","html_url":"https://github.com/sketchfab","followers_url":"https://api.github.com/users/sketchfab/followers","following_url":"https://api.github.com/users/sketchfab/following{/other_user}","gists_url":"https://api.github.com/users/sketchfab/gists{/gist_id}","starred_url":"https://api.github.com/users/sketchfab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sketchfab/subscriptions","organizations_url":"https://api.github.com/users/sketchfab/orgs","repos_url":"https://api.github.com/users/sketchfab/repos","events_url":"https://api.github.com/users/sketchfab/events{/privacy}","received_events_url":"https://api.github.com/users/sketchfab/received_events","type":"Organization","site_admin":false},"repo":{"id":33258673,"name":"ksp-exporter","full_name":"sketchfab/ksp-exporter","owner":{"login":"sketchfab","id":2936542,"avatar_url":"https://avatars.githubusercontent.com/u/2936542?v=3","gravatar_id":"","url":"https://api.github.com/users/sketchfab","html_url":"https://github.com/sketchfab","followers_url":"https://api.github.com/users/sketchfab/followers","following_url":"https://api.github.com/users/sketchfab/following{/other_user}","gists_url":"https://api.github.com/users/sketchfab/gists{/gist_id}","starred_url":"https://api.github.com/users/sketchfab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sketchfab/subscriptions","organizations_url":"https://api.github.com/users/sketchfab/orgs","repos_url":"https://api.github.com/users/sketchfab/repos","events_url":"https://api.github.com/users/sketchfab/events{/privacy}","received_events_url":"https://api.github.com/users/sketchfab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sketchfab/ksp-exporter","description":"","fork":false,"url":"https://api.github.com/repos/sketchfab/ksp-exporter","forks_url":"https://api.github.com/repos/sketchfab/ksp-exporter/forks","keys_url":"https://api.github.com/repos/sketchfab/ksp-exporter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sketchfab/ksp-exporter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sketchfab/ksp-exporter/teams","hooks_url":"https://api.github.com/repos/sketchfab/ksp-exporter/hooks","issue_events_url":"https://api.github.com/repos/sketchfab/ksp-exporter/issues/events{/number}","events_url":"https://api.github.com/repos/sketchfab/ksp-exporter/events","assignees_url":"https://api.github.com/repos/sketchfab/ksp-exporter/assignees{/user}","branches_url":"https://api.github.com/repos/sketchfab/ksp-exporter/branches{/branch}","tags_url":"https://api.github.com/repos/sketchfab/ksp-exporter/tags","blobs_url":"https://api.github.com/repos/sketchfab/ksp-exporter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sketchfab/ksp-exporter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sketchfab/ksp-exporter/git/refs{/sha}","trees_url":"https://api.github.com/repos/sketchfab/ksp-exporter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sketchfab/ksp-exporter/statuses/{sha}","languages_url":"https://api.github.com/repos/sketchfab/ksp-exporter/languages","stargazers_url":"https://api.github.com/repos/sketchfab/ksp-exporter/stargazers","contributors_url":"https://api.github.com/repos/sketchfab/ksp-exporter/contributors","subscribers_url":"https://api.github.com/repos/sketchfab/ksp-exporter/subscribers","subscription_url":"https://api.github.com/repos/sketchfab/ksp-exporter/subscription","commits_url":"https://api.github.com/repos/sketchfab/ksp-exporter/commits{/sha}","git_commits_url":"https://api.github.com/repos/sketchfab/ksp-exporter/git/commits{/sha}","comments_url":"https://api.github.com/repos/sketchfab/ksp-exporter/comments{/number}","issue_comment_url":"https://api.github.com/repos/sketchfab/ksp-exporter/issues/comments{/number}","contents_url":"https://api.github.com/repos/sketchfab/ksp-exporter/contents/{+path}","compare_url":"https://api.github.com/repos/sketchfab/ksp-exporter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sketchfab/ksp-exporter/merges","archive_url":"https://api.github.com/repos/sketchfab/ksp-exporter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sketchfab/ksp-exporter/downloads","issues_url":"https://api.github.com/repos/sketchfab/ksp-exporter/issues{/number}","pulls_url":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls{/number}","milestones_url":"https://api.github.com/repos/sketchfab/ksp-exporter/milestones{/number}","notifications_url":"https://api.github.com/repos/sketchfab/ksp-exporter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sketchfab/ksp-exporter/labels{/name}","releases_url":"https://api.github.com/repos/sketchfab/ksp-exporter/releases{/id}","created_at":"2015-04-01T16:22:27Z","updated_at":"2015-04-01T17:29:26Z","pushed_at":"2015-04-27T07:53:04Z","git_url":"git://github.com/sketchfab/ksp-exporter.git","ssh_url":"git@github.com:sketchfab/ksp-exporter.git","clone_url":"https://github.com/sketchfab/ksp-exporter.git","svn_url":"https://github.com/sketchfab/ksp-exporter","homepage":null,"size":33012,"stargazers_count":0,"watchers_count":0,"language":"Tcl","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls/1"},"html":{"href":"https://github.com/sketchfab/ksp-exporter/pull/1"},"issue":{"href":"https://api.github.com/repos/sketchfab/ksp-exporter/issues/1"},"comments":{"href":"https://api.github.com/repos/sketchfab/ksp-exporter/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sketchfab/ksp-exporter/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/sketchfab/ksp-exporter/statuses/a40b8a09acf06673aed292df95e3cacd71acb8c0"}}}}