{"action":"created","comment":{"url":"https://api.github.com/repos/cosven/FeelUOwn/pulls/comments/63823560","id":63823560,"diff_hunk":"@@ -138,6 +140,38 @@ def search(cls, text):\n                 songs = data['result']['songs']\n         return cls.batch_create(songs)\n \n+    def download(self):\n+        NemDownThread(self).start()\n+\n+\n+class NemDownThread(Thread):","path":"feeluown/plugins/neteasemusic/model.py","position":23,"original_position":23,"commit_id":"e9415da3695b5c4c1b0cf581704eb8039b234d7b","original_commit_id":"e9415da3695b5c4c1b0cf581704eb8039b234d7b","user":{"login":"cosven","id":4962134,"avatar_url":"https://avatars.githubusercontent.com/u/4962134?v=3","gravatar_id":"","url":"https://api.github.com/users/cosven","html_url":"https://github.com/cosven","followers_url":"https://api.github.com/users/cosven/followers","following_url":"https://api.github.com/users/cosven/following{/other_user}","gists_url":"https://api.github.com/users/cosven/gists{/gist_id}","starred_url":"https://api.github.com/users/cosven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosven/subscriptions","organizations_url":"https://api.github.com/users/cosven/orgs","repos_url":"https://api.github.com/users/cosven/repos","events_url":"https://api.github.com/users/cosven/events{/privacy}","received_events_url":"https://api.github.com/users/cosven/received_events","type":"User","site_admin":false},"body":"因为程序使用了 asyncio ，我想能不能使用 asyncio 来代替 Thread 。\r\n比如：\r\n```\r\nevent_loop = asyncio.get_event_loop()\r\nevent_loop.run_in_executor(...)  # 创建一个 dummy thread 来下载\r\n```","created_at":"2016-05-19T05:14:38Z","updated_at":"2016-05-19T05:14:38Z","html_url":"https://github.com/cosven/FeelUOwn/pull/168#discussion_r63823560","pull_request_url":"https://api.github.com/repos/cosven/FeelUOwn/pulls/168","_links":{"self":{"href":"https://api.github.com/repos/cosven/FeelUOwn/pulls/comments/63823560"},"html":{"href":"https://github.com/cosven/FeelUOwn/pull/168#discussion_r63823560"},"pull_request":{"href":"https://api.github.com/repos/cosven/FeelUOwn/pulls/168"}}},"pull_request":{"url":"https://api.github.com/repos/cosven/FeelUOwn/pulls/168","id":70634190,"html_url":"https://github.com/cosven/FeelUOwn/pull/168","diff_url":"https://github.com/cosven/FeelUOwn/pull/168.diff","patch_url":"https://github.com/cosven/FeelUOwn/pull/168.patch","issue_url":"https://api.github.com/repos/cosven/FeelUOwn/issues/168","number":168,"state":"open","locked":false,"title":"Netease music download support.","user":{"login":"BruceZhang1993","id":6873988,"avatar_url":"https://avatars.githubusercontent.com/u/6873988?v=3","gravatar_id":"","url":"https://api.github.com/users/BruceZhang1993","html_url":"https://github.com/BruceZhang1993","followers_url":"https://api.github.com/users/BruceZhang1993/followers","following_url":"https://api.github.com/users/BruceZhang1993/following{/other_user}","gists_url":"https://api.github.com/users/BruceZhang1993/gists{/gist_id}","starred_url":"https://api.github.com/users/BruceZhang1993/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BruceZhang1993/subscriptions","organizations_url":"https://api.github.com/users/BruceZhang1993/orgs","repos_url":"https://api.github.com/users/BruceZhang1993/repos","events_url":"https://api.github.com/users/BruceZhang1993/events{/privacy}","received_events_url":"https://api.github.com/users/BruceZhang1993/received_events","type":"User","site_admin":false},"body":"简单实现了一下音乐下载～\r\n目前不足是没有进度的显示，没有批量下载，\r\n还有 歌曲的 IDv3 信息应该通过 idv3 库写进去","created_at":"2016-05-19T04:07:50Z","updated_at":"2016-05-19T05:14:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b652673c6bb96df3289a8210bdea5340f0ec5da","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cosven/FeelUOwn/pulls/168/commits","review_comments_url":"https://api.github.com/repos/cosven/FeelUOwn/pulls/168/comments","review_comment_url":"https://api.github.com/repos/cosven/FeelUOwn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cosven/FeelUOwn/issues/168/comments","statuses_url":"https://api.github.com/repos/cosven/FeelUOwn/statuses/e9415da3695b5c4c1b0cf581704eb8039b234d7b","head":{"label":"BruceZhang1993:dev","ref":"dev","sha":"e9415da3695b5c4c1b0cf581704eb8039b234d7b","user":{"login":"BruceZhang1993","id":6873988,"avatar_url":"https://avatars.githubusercontent.com/u/6873988?v=3","gravatar_id":"","url":"https://api.github.com/users/BruceZhang1993","html_url":"https://github.com/BruceZhang1993","followers_url":"https://api.github.com/users/BruceZhang1993/followers","following_url":"https://api.github.com/users/BruceZhang1993/following{/other_user}","gists_url":"https://api.github.com/users/BruceZhang1993/gists{/gist_id}","starred_url":"https://api.github.com/users/BruceZhang1993/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BruceZhang1993/subscriptions","organizations_url":"https://api.github.com/users/BruceZhang1993/orgs","repos_url":"https://api.github.com/users/BruceZhang1993/repos","events_url":"https://api.github.com/users/BruceZhang1993/events{/privacy}","received_events_url":"https://api.github.com/users/BruceZhang1993/received_events","type":"User","site_admin":false},"repo":{"id":59168598,"name":"FeelUOwn","full_name":"BruceZhang1993/FeelUOwn","owner":{"login":"BruceZhang1993","id":6873988,"avatar_url":"https://avatars.githubusercontent.com/u/6873988?v=3","gravatar_id":"","url":"https://api.github.com/users/BruceZhang1993","html_url":"https://github.com/BruceZhang1993","followers_url":"https://api.github.com/users/BruceZhang1993/followers","following_url":"https://api.github.com/users/BruceZhang1993/following{/other_user}","gists_url":"https://api.github.com/users/BruceZhang1993/gists{/gist_id}","starred_url":"https://api.github.com/users/BruceZhang1993/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BruceZhang1993/subscriptions","organizations_url":"https://api.github.com/users/BruceZhang1993/orgs","repos_url":"https://api.github.com/users/BruceZhang1993/repos","events_url":"https://api.github.com/users/BruceZhang1993/events{/privacy}","received_events_url":"https://api.github.com/users/BruceZhang1993/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/BruceZhang1993/FeelUOwn","description":"nothing but the alternate","fork":true,"url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn","forks_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/forks","keys_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/teams","hooks_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/hooks","issue_events_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/issues/events{/number}","events_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/events","assignees_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/assignees{/user}","branches_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/branches{/branch}","tags_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/tags","blobs_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/git/refs{/sha}","trees_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/statuses/{sha}","languages_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/languages","stargazers_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/stargazers","contributors_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/contributors","subscribers_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/subscribers","subscription_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/subscription","commits_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/commits{/sha}","git_commits_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/git/commits{/sha}","comments_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/comments{/number}","issue_comment_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/issues/comments{/number}","contents_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/contents/{+path}","compare_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/merges","archive_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/downloads","issues_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/issues{/number}","pulls_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/pulls{/number}","milestones_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/milestones{/number}","notifications_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/labels{/name}","releases_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/releases{/id}","deployments_url":"https://api.github.com/repos/BruceZhang1993/FeelUOwn/deployments","created_at":"2016-05-19T02:50:33Z","updated_at":"2016-05-19T02:50:34Z","pushed_at":"2016-05-19T04:05:26Z","git_url":"git://github.com/BruceZhang1993/FeelUOwn.git","ssh_url":"git@github.com:BruceZhang1993/FeelUOwn.git","clone_url":"https://github.com/BruceZhang1993/FeelUOwn.git","svn_url":"https://github.com/BruceZhang1993/FeelUOwn","homepage":"","size":2309,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cosven:dev","ref":"dev","sha":"7738d0c968e996982b70d09f2dc3f097f437f2b2","user":{"login":"cosven","id":4962134,"avatar_url":"https://avatars.githubusercontent.com/u/4962134?v=3","gravatar_id":"","url":"https://api.github.com/users/cosven","html_url":"https://github.com/cosven","followers_url":"https://api.github.com/users/cosven/followers","following_url":"https://api.github.com/users/cosven/following{/other_user}","gists_url":"https://api.github.com/users/cosven/gists{/gist_id}","starred_url":"https://api.github.com/users/cosven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosven/subscriptions","organizations_url":"https://api.github.com/users/cosven/orgs","repos_url":"https://api.github.com/users/cosven/repos","events_url":"https://api.github.com/users/cosven/events{/privacy}","received_events_url":"https://api.github.com/users/cosven/received_events","type":"User","site_admin":false},"repo":{"id":38036470,"name":"FeelUOwn","full_name":"cosven/FeelUOwn","owner":{"login":"cosven","id":4962134,"avatar_url":"https://avatars.githubusercontent.com/u/4962134?v=3","gravatar_id":"","url":"https://api.github.com/users/cosven","html_url":"https://github.com/cosven","followers_url":"https://api.github.com/users/cosven/followers","following_url":"https://api.github.com/users/cosven/following{/other_user}","gists_url":"https://api.github.com/users/cosven/gists{/gist_id}","starred_url":"https://api.github.com/users/cosven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosven/subscriptions","organizations_url":"https://api.github.com/users/cosven/orgs","repos_url":"https://api.github.com/users/cosven/repos","events_url":"https://api.github.com/users/cosven/events{/privacy}","received_events_url":"https://api.github.com/users/cosven/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cosven/FeelUOwn","description":"nothing but the alternate","fork":false,"url":"https://api.github.com/repos/cosven/FeelUOwn","forks_url":"https://api.github.com/repos/cosven/FeelUOwn/forks","keys_url":"https://api.github.com/repos/cosven/FeelUOwn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cosven/FeelUOwn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cosven/FeelUOwn/teams","hooks_url":"https://api.github.com/repos/cosven/FeelUOwn/hooks","issue_events_url":"https://api.github.com/repos/cosven/FeelUOwn/issues/events{/number}","events_url":"https://api.github.com/repos/cosven/FeelUOwn/events","assignees_url":"https://api.github.com/repos/cosven/FeelUOwn/assignees{/user}","branches_url":"https://api.github.com/repos/cosven/FeelUOwn/branches{/branch}","tags_url":"https://api.github.com/repos/cosven/FeelUOwn/tags","blobs_url":"https://api.github.com/repos/cosven/FeelUOwn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cosven/FeelUOwn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cosven/FeelUOwn/git/refs{/sha}","trees_url":"https://api.github.com/repos/cosven/FeelUOwn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cosven/FeelUOwn/statuses/{sha}","languages_url":"https://api.github.com/repos/cosven/FeelUOwn/languages","stargazers_url":"https://api.github.com/repos/cosven/FeelUOwn/stargazers","contributors_url":"https://api.github.com/repos/cosven/FeelUOwn/contributors","subscribers_url":"https://api.github.com/repos/cosven/FeelUOwn/subscribers","subscription_url":"https://api.github.com/repos/cosven/FeelUOwn/subscription","commits_url":"https://api.github.com/repos/cosven/FeelUOwn/commits{/sha}","git_commits_url":"https://api.github.com/repos/cosven/FeelUOwn/git/commits{/sha}","comments_url":"https://api.github.com/repos/cosven/FeelUOwn/comments{/number}","issue_comment_url":"https://api.github.com/repos/cosven/FeelUOwn/issues/comments{/number}","contents_url":"https://api.github.com/repos/cosven/FeelUOwn/contents/{+path}","compare_url":"https://api.github.com/repos/cosven/FeelUOwn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cosven/FeelUOwn/merges","archive_url":"https://api.github.com/repos/cosven/FeelUOwn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cosven/FeelUOwn/downloads","issues_url":"https://api.github.com/repos/cosven/FeelUOwn/issues{/number}","pulls_url":"https://api.github.com/repos/cosven/FeelUOwn/pulls{/number}","milestones_url":"https://api.github.com/repos/cosven/FeelUOwn/milestones{/number}","notifications_url":"https://api.github.com/repos/cosven/FeelUOwn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cosven/FeelUOwn/labels{/name}","releases_url":"https://api.github.com/repos/cosven/FeelUOwn/releases{/id}","deployments_url":"https://api.github.com/repos/cosven/FeelUOwn/deployments","created_at":"2015-06-25T08:06:16Z","updated_at":"2016-05-19T02:43:09Z","pushed_at":"2016-05-19T04:07:50Z","git_url":"git://github.com/cosven/FeelUOwn.git","ssh_url":"git@github.com:cosven/FeelUOwn.git","clone_url":"https://github.com/cosven/FeelUOwn.git","svn_url":"https://github.com/cosven/FeelUOwn","homepage":"","size":2497,"stargazers_count":805,"watchers_count":805,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":201,"mirror_url":null,"open_issues_count":45,"forks":201,"open_issues":45,"watchers":805,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cosven/FeelUOwn/pulls/168"},"html":{"href":"https://github.com/cosven/FeelUOwn/pull/168"},"issue":{"href":"https://api.github.com/repos/cosven/FeelUOwn/issues/168"},"comments":{"href":"https://api.github.com/repos/cosven/FeelUOwn/issues/168/comments"},"review_comments":{"href":"https://api.github.com/repos/cosven/FeelUOwn/pulls/168/comments"},"review_comment":{"href":"https://api.github.com/repos/cosven/FeelUOwn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cosven/FeelUOwn/pulls/168/commits"},"statuses":{"href":"https://api.github.com/repos/cosven/FeelUOwn/statuses/e9415da3695b5c4c1b0cf581704eb8039b234d7b"}}}}