{"action":"created","comment":{"url":"https://api.github.com/repos/lbryio/lbry-app/pulls/comments/176232450","pull_request_review_id":105900654,"id":176232450,"diff_hunk":"@@ -0,0 +1,89 @@\n+// @flow\n+import * as actions from \"constants/action_types\";\n+import type { Action, Dispatch } from \"redux/reducers/upload\";\n+import lbry from \"lbry\";\n+import fs from \"fs\";\n+import path from \"path\";\n+import { disconnect } from \"cluster\";\n+\n+export const resetSpeechUpload = () => (dispatch: Dispatch) => {\n+  return fetch(\"https://spee.ch/api/channel/availability/@testing\")\n+    .then(response => {\n+      console.log(\"res:\", response);\n+      return dispatch({\n+        type: actions.SPEECH_UPLOAD_RESET,\n+        data: {\n+          api: true\n+        }\n+      })\n+    })\n+    .catch(err => {\n+      console.log(\"err:\", err);\n+      return dispatch({\n+        type: actions.SPEECH_UPLOAD_RESET,\n+        data: {\n+          api: false\n+        }\n+      })\n+    })\n+\n+}\n+\n+export const setThumbnailStatusManual = () => (dispatch: Dispatch) =>\n+  dispatch({ type: actions.THUMBNAIL_SET_MANUAL_STATUS });\n+\n+export const setManualThumbnailUrl = (url: string) => (dispatch: Dispatch) =>\n+  dispatch({\n+    type: actions.THUMBNAIL_MANUAL_URL_UPDATE,\n+    data: { url },\n+  });\n+\n+export const beginSpeechUpload = (filePath: string, nsfw: boolean = false) => (\n+  dispatch: Dispatch\n+) => {\n+  console.log(filePath);\n+  const thumbnail = fs.readFileSync(filePath);\n+  const fileExt = path.extname(filePath);\n+  const fileName = path.basename(filePath, fileExt);\n+  const safeName = fileName","path":"src/renderer/redux/actions/upload.js","position":48,"original_position":48,"commit_id":"ddcb7a4dc6aedd1d096d2ec3118d0469514c12c6","original_commit_id":"ddcb7a4dc6aedd1d096d2ec3118d0469514c12c6","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars1.githubusercontent.com/u/19940114?v=4","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://app.codacy.com/assets/images/favicon.png) Issue found: ['safeName' is assigned a value but never used. (no-unused-vars)](https://app.codacy.com/app/LBRY/lbry-app/pullRequest?prid=1458953)","created_at":"2018-03-21T20:46:36Z","updated_at":"2018-03-21T20:46:36Z","html_url":"https://github.com/lbryio/lbry-app/pull/1161#discussion_r176232450","pull_request_url":"https://api.github.com/repos/lbryio/lbry-app/pulls/1161","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/lbryio/lbry-app/pulls/comments/176232450"},"html":{"href":"https://github.com/lbryio/lbry-app/pull/1161#discussion_r176232450"},"pull_request":{"href":"https://api.github.com/repos/lbryio/lbry-app/pulls/1161"}}},"pull_request":{"url":"https://api.github.com/repos/lbryio/lbry-app/pulls/1161","id":176577985,"html_url":"https://github.com/lbryio/lbry-app/pull/1161","diff_url":"https://github.com/lbryio/lbry-app/pull/1161.diff","patch_url":"https://github.com/lbryio/lbry-app/pull/1161.patch","issue_url":"https://api.github.com/repos/lbryio/lbry-app/issues/1161","number":1161,"state":"open","locked":false,"title":"Thumbnail upload via spee.ch","user":{"login":"daovist","id":34498824,"avatar_url":"https://avatars2.githubusercontent.com/u/34498824?v=4","gravatar_id":"","url":"https://api.github.com/users/daovist","html_url":"https://github.com/daovist","followers_url":"https://api.github.com/users/daovist/followers","following_url":"https://api.github.com/users/daovist/following{/other_user}","gists_url":"https://api.github.com/users/daovist/gists{/gist_id}","starred_url":"https://api.github.com/users/daovist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daovist/subscriptions","organizations_url":"https://api.github.com/users/daovist/orgs","repos_url":"https://api.github.com/users/daovist/repos","events_url":"https://api.github.com/users/daovist/events{/privacy}","received_events_url":"https://api.github.com/users/daovist/received_events","type":"User","site_admin":false},"body":"upload:\r\n![1 - upload thumbnail](https://user-images.githubusercontent.com/34498824/37731140-bd2bca96-2d17-11e8-9013-f9547adf4cda.png)\r\n\r\nmanually enter URL:\r\n![2 - manual url](https://user-images.githubusercontent.com/34498824/37731147-c0b73f4c-2d17-11e8-932e-0760ce3869b4.png)\r\n\r\nconfirm upload:\r\n![3 - confirm upload](https://user-images.githubusercontent.com/34498824/37731152-c410b2c2-2d17-11e8-8ca2-d1f4ff4a287c.png)\r\n\r\nupload in progress:\r\n![4 - uploading](https://user-images.githubusercontent.com/34498824/37731156-c723c526-2d17-11e8-8cd9-14f4cf662e53.png)\r\n\r\ncomplete:\r\n![5 - success](https://user-images.githubusercontent.com/34498824/37731161-ca85ace8-2d17-11e8-8d63-8109c31bfbf4.png)\r\n\r\nSorry to make yet another PR on this. It had been a while since I'd worked on this issue.","created_at":"2018-03-21T18:56:35Z","updated_at":"2018-03-21T20:46:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90eb040ae7c8dcfcbd0cc7340530585c1462c47d","assignee":{"login":"liamcardenas","id":5027235,"avatar_url":"https://avatars1.githubusercontent.com/u/5027235?v=4","gravatar_id":"","url":"https://api.github.com/users/liamcardenas","html_url":"https://github.com/liamcardenas","followers_url":"https://api.github.com/users/liamcardenas/followers","following_url":"https://api.github.com/users/liamcardenas/following{/other_user}","gists_url":"https://api.github.com/users/liamcardenas/gists{/gist_id}","starred_url":"https://api.github.com/users/liamcardenas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liamcardenas/subscriptions","organizations_url":"https://api.github.com/users/liamcardenas/orgs","repos_url":"https://api.github.com/users/liamcardenas/repos","events_url":"https://api.github.com/users/liamcardenas/events{/privacy}","received_events_url":"https://api.github.com/users/liamcardenas/received_events","type":"User","site_admin":false},"assignees":[{"login":"liamcardenas","id":5027235,"avatar_url":"https://avatars1.githubusercontent.com/u/5027235?v=4","gravatar_id":"","url":"https://api.github.com/users/liamcardenas","html_url":"https://github.com/liamcardenas","followers_url":"https://api.github.com/users/liamcardenas/followers","following_url":"https://api.github.com/users/liamcardenas/following{/other_user}","gists_url":"https://api.github.com/users/liamcardenas/gists{/gist_id}","starred_url":"https://api.github.com/users/liamcardenas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liamcardenas/subscriptions","organizations_url":"https://api.github.com/users/liamcardenas/orgs","repos_url":"https://api.github.com/users/liamcardenas/repos","events_url":"https://api.github.com/users/liamcardenas/events{/privacy}","received_events_url":"https://api.github.com/users/liamcardenas/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lbryio/lbry-app/pulls/1161/commits","review_comments_url":"https://api.github.com/repos/lbryio/lbry-app/pulls/1161/comments","review_comment_url":"https://api.github.com/repos/lbryio/lbry-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lbryio/lbry-app/issues/1161/comments","statuses_url":"https://api.github.com/repos/lbryio/lbry-app/statuses/ddcb7a4dc6aedd1d096d2ec3118d0469514c12c6","head":{"label":"daovist:thumbnail-upload","ref":"thumbnail-upload","sha":"ddcb7a4dc6aedd1d096d2ec3118d0469514c12c6","user":{"login":"daovist","id":34498824,"avatar_url":"https://avatars2.githubusercontent.com/u/34498824?v=4","gravatar_id":"","url":"https://api.github.com/users/daovist","html_url":"https://github.com/daovist","followers_url":"https://api.github.com/users/daovist/followers","following_url":"https://api.github.com/users/daovist/following{/other_user}","gists_url":"https://api.github.com/users/daovist/gists{/gist_id}","starred_url":"https://api.github.com/users/daovist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daovist/subscriptions","organizations_url":"https://api.github.com/users/daovist/orgs","repos_url":"https://api.github.com/users/daovist/repos","events_url":"https://api.github.com/users/daovist/events{/privacy}","received_events_url":"https://api.github.com/users/daovist/received_events","type":"User","site_admin":false},"repo":{"id":114157588,"name":"lbry-app","full_name":"daovist/lbry-app","owner":{"login":"daovist","id":34498824,"avatar_url":"https://avatars2.githubusercontent.com/u/34498824?v=4","gravatar_id":"","url":"https://api.github.com/users/daovist","html_url":"https://github.com/daovist","followers_url":"https://api.github.com/users/daovist/followers","following_url":"https://api.github.com/users/daovist/following{/other_user}","gists_url":"https://api.github.com/users/daovist/gists{/gist_id}","starred_url":"https://api.github.com/users/daovist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daovist/subscriptions","organizations_url":"https://api.github.com/users/daovist/orgs","repos_url":"https://api.github.com/users/daovist/repos","events_url":"https://api.github.com/users/daovist/events{/privacy}","received_events_url":"https://api.github.com/users/daovist/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daovist/lbry-app","description":"A browser and wallet for LBRY, the decentralized, user-controlled content marketplace.","fork":true,"url":"https://api.github.com/repos/daovist/lbry-app","forks_url":"https://api.github.com/repos/daovist/lbry-app/forks","keys_url":"https://api.github.com/repos/daovist/lbry-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daovist/lbry-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daovist/lbry-app/teams","hooks_url":"https://api.github.com/repos/daovist/lbry-app/hooks","issue_events_url":"https://api.github.com/repos/daovist/lbry-app/issues/events{/number}","events_url":"https://api.github.com/repos/daovist/lbry-app/events","assignees_url":"https://api.github.com/repos/daovist/lbry-app/assignees{/user}","branches_url":"https://api.github.com/repos/daovist/lbry-app/branches{/branch}","tags_url":"https://api.github.com/repos/daovist/lbry-app/tags","blobs_url":"https://api.github.com/repos/daovist/lbry-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daovist/lbry-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daovist/lbry-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/daovist/lbry-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daovist/lbry-app/statuses/{sha}","languages_url":"https://api.github.com/repos/daovist/lbry-app/languages","stargazers_url":"https://api.github.com/repos/daovist/lbry-app/stargazers","contributors_url":"https://api.github.com/repos/daovist/lbry-app/contributors","subscribers_url":"https://api.github.com/repos/daovist/lbry-app/subscribers","subscription_url":"https://api.github.com/repos/daovist/lbry-app/subscription","commits_url":"https://api.github.com/repos/daovist/lbry-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/daovist/lbry-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/daovist/lbry-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/daovist/lbry-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/daovist/lbry-app/contents/{+path}","compare_url":"https://api.github.com/repos/daovist/lbry-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daovist/lbry-app/merges","archive_url":"https://api.github.com/repos/daovist/lbry-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daovist/lbry-app/downloads","issues_url":"https://api.github.com/repos/daovist/lbry-app/issues{/number}","pulls_url":"https://api.github.com/repos/daovist/lbry-app/pulls{/number}","milestones_url":"https://api.github.com/repos/daovist/lbry-app/milestones{/number}","notifications_url":"https://api.github.com/repos/daovist/lbry-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daovist/lbry-app/labels{/name}","releases_url":"https://api.github.com/repos/daovist/lbry-app/releases{/id}","deployments_url":"https://api.github.com/repos/daovist/lbry-app/deployments","created_at":"2017-12-13T18:55:51Z","updated_at":"2018-03-21T16:44:05Z","pushed_at":"2018-03-21T20:43:41Z","git_url":"git://github.com/daovist/lbry-app.git","ssh_url":"git@github.com:daovist/lbry-app.git","clone_url":"https://github.com/daovist/lbry-app.git","svn_url":"https://github.com/daovist/lbry-app","homepage":"https://lbry.io","size":18745,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"lbryio:master","ref":"master","sha":"3200cfe25bd40892d621cc5d255de1793e4ba9aa","user":{"login":"lbryio","id":13889222,"avatar_url":"https://avatars3.githubusercontent.com/u/13889222?v=4","gravatar_id":"","url":"https://api.github.com/users/lbryio","html_url":"https://github.com/lbryio","followers_url":"https://api.github.com/users/lbryio/followers","following_url":"https://api.github.com/users/lbryio/following{/other_user}","gists_url":"https://api.github.com/users/lbryio/gists{/gist_id}","starred_url":"https://api.github.com/users/lbryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbryio/subscriptions","organizations_url":"https://api.github.com/users/lbryio/orgs","repos_url":"https://api.github.com/users/lbryio/repos","events_url":"https://api.github.com/users/lbryio/events{/privacy}","received_events_url":"https://api.github.com/users/lbryio/received_events","type":"Organization","site_admin":false},"repo":{"id":79149882,"name":"lbry-app","full_name":"lbryio/lbry-app","owner":{"login":"lbryio","id":13889222,"avatar_url":"https://avatars3.githubusercontent.com/u/13889222?v=4","gravatar_id":"","url":"https://api.github.com/users/lbryio","html_url":"https://github.com/lbryio","followers_url":"https://api.github.com/users/lbryio/followers","following_url":"https://api.github.com/users/lbryio/following{/other_user}","gists_url":"https://api.github.com/users/lbryio/gists{/gist_id}","starred_url":"https://api.github.com/users/lbryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbryio/subscriptions","organizations_url":"https://api.github.com/users/lbryio/orgs","repos_url":"https://api.github.com/users/lbryio/repos","events_url":"https://api.github.com/users/lbryio/events{/privacy}","received_events_url":"https://api.github.com/users/lbryio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lbryio/lbry-app","description":"A browser and wallet for LBRY, the decentralized, user-controlled content marketplace.","fork":false,"url":"https://api.github.com/repos/lbryio/lbry-app","forks_url":"https://api.github.com/repos/lbryio/lbry-app/forks","keys_url":"https://api.github.com/repos/lbryio/lbry-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lbryio/lbry-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lbryio/lbry-app/teams","hooks_url":"https://api.github.com/repos/lbryio/lbry-app/hooks","issue_events_url":"https://api.github.com/repos/lbryio/lbry-app/issues/events{/number}","events_url":"https://api.github.com/repos/lbryio/lbry-app/events","assignees_url":"https://api.github.com/repos/lbryio/lbry-app/assignees{/user}","branches_url":"https://api.github.com/repos/lbryio/lbry-app/branches{/branch}","tags_url":"https://api.github.com/repos/lbryio/lbry-app/tags","blobs_url":"https://api.github.com/repos/lbryio/lbry-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lbryio/lbry-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lbryio/lbry-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/lbryio/lbry-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lbryio/lbry-app/statuses/{sha}","languages_url":"https://api.github.com/repos/lbryio/lbry-app/languages","stargazers_url":"https://api.github.com/repos/lbryio/lbry-app/stargazers","contributors_url":"https://api.github.com/repos/lbryio/lbry-app/contributors","subscribers_url":"https://api.github.com/repos/lbryio/lbry-app/subscribers","subscription_url":"https://api.github.com/repos/lbryio/lbry-app/subscription","commits_url":"https://api.github.com/repos/lbryio/lbry-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/lbryio/lbry-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/lbryio/lbry-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/lbryio/lbry-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/lbryio/lbry-app/contents/{+path}","compare_url":"https://api.github.com/repos/lbryio/lbry-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lbryio/lbry-app/merges","archive_url":"https://api.github.com/repos/lbryio/lbry-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lbryio/lbry-app/downloads","issues_url":"https://api.github.com/repos/lbryio/lbry-app/issues{/number}","pulls_url":"https://api.github.com/repos/lbryio/lbry-app/pulls{/number}","milestones_url":"https://api.github.com/repos/lbryio/lbry-app/milestones{/number}","notifications_url":"https://api.github.com/repos/lbryio/lbry-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lbryio/lbry-app/labels{/name}","releases_url":"https://api.github.com/repos/lbryio/lbry-app/releases{/id}","deployments_url":"https://api.github.com/repos/lbryio/lbry-app/deployments","created_at":"2017-01-16T19:05:32Z","updated_at":"2018-03-21T18:18:20Z","pushed_at":"2018-03-21T20:43:42Z","git_url":"git://github.com/lbryio/lbry-app.git","ssh_url":"git@github.com:lbryio/lbry-app.git","clone_url":"https://github.com/lbryio/lbry-app.git","svn_url":"https://github.com/lbryio/lbry-app","homepage":"https://lbry.io","size":20765,"stargazers_count":331,"watchers_count":331,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":97,"mirror_url":null,"archived":false,"open_issues_count":216,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":97,"open_issues":216,"watchers":331,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lbryio/lbry-app/pulls/1161"},"html":{"href":"https://github.com/lbryio/lbry-app/pull/1161"},"issue":{"href":"https://api.github.com/repos/lbryio/lbry-app/issues/1161"},"comments":{"href":"https://api.github.com/repos/lbryio/lbry-app/issues/1161/comments"},"review_comments":{"href":"https://api.github.com/repos/lbryio/lbry-app/pulls/1161/comments"},"review_comment":{"href":"https://api.github.com/repos/lbryio/lbry-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lbryio/lbry-app/pulls/1161/commits"},"statuses":{"href":"https://api.github.com/repos/lbryio/lbry-app/statuses/ddcb7a4dc6aedd1d096d2ec3118d0469514c12c6"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"codacy-bot"}}