{"action":"opened","number":42,"pull_request":{"url":"https://api.github.com/repos/m13253/BiliDan/pulls/42","id":52093362,"html_url":"https://github.com/m13253/BiliDan/pull/42","diff_url":"https://github.com/m13253/BiliDan/pull/42.diff","patch_url":"https://github.com/m13253/BiliDan/pull/42.patch","issue_url":"https://api.github.com/repos/m13253/BiliDan/issues/42","number":42,"state":"open","locked":false,"title":"Add Video + Comment Download Capability","user":{"login":"antonizoon","id":614893,"avatar_url":"https://avatars.githubusercontent.com/u/614893?v=3","gravatar_id":"","url":"https://api.github.com/users/antonizoon","html_url":"https://github.com/antonizoon","followers_url":"https://api.github.com/users/antonizoon/followers","following_url":"https://api.github.com/users/antonizoon/following{/other_user}","gists_url":"https://api.github.com/users/antonizoon/gists{/gist_id}","starred_url":"https://api.github.com/users/antonizoon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonizoon/subscriptions","organizations_url":"https://api.github.com/users/antonizoon/orgs","repos_url":"https://api.github.com/users/antonizoon/repos","events_url":"https://api.github.com/users/antonizoon/events{/privacy}","received_events_url":"https://api.github.com/users/antonizoon/received_events","type":"User","site_admin":false},"body":"I noticed that while BiliDan is able to play videos with comments, it is also capable of recording them with comments. Thus, I have added this feature to BiliDan.\r\n\r\n`mpv` has an argument called `--stream-dump=<file>`, which can be used to record streaming video to a folder, so I added the argument `-r/--record` that will set this on `mpv`. Also, the video will only download, not display.\r\n\r\nI also save the BiliBili API's `video_metadata` in `bilibili-av<aid>-<cid>.json`, with the original URL attached, just for the sake of archival.\r\n\r\n---\r\n\r\nOne minor caveat is that `mpv` shows an error even though the file was downloaded correctly. Somehow we need to catch and silence that error, because there is no problem at all.\r\n\r\n```\r\nINFO: Launching media player...\r\nINFO: NOTICE: Ignore \"Exiting... (Errors when loading file)\", the video downloaded correctly if \"Dumping...\" finishes.\r\nPlaying: http://ws.acgvideo.com/8/65/3262388-1.flv?wsTime=1448875618&wsSecret2=dfe83f92bd05b4d489e74b0bda0318f9&oi=1111974496&appkey=85eb6835b0a1034e&or=3231821114\r\n\r\nDumping 6122886/6122886...\r\n\r\nExiting... (Errors when loading file)\r\n```","created_at":"2015-11-30T07:44:34Z","updated_at":"2015-11-30T07:44:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/m13253/BiliDan/pulls/42/commits","review_comments_url":"https://api.github.com/repos/m13253/BiliDan/pulls/42/comments","review_comment_url":"https://api.github.com/repos/m13253/BiliDan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/m13253/BiliDan/issues/42/comments","statuses_url":"https://api.github.com/repos/m13253/BiliDan/statuses/856bac1aaa85b0a2c8a3b2e50028928a766a117f","head":{"label":"bibanon:master","ref":"master","sha":"856bac1aaa85b0a2c8a3b2e50028928a766a117f","user":{"login":"bibanon","id":1455677,"avatar_url":"https://avatars.githubusercontent.com/u/1455677?v=3","gravatar_id":"","url":"https://api.github.com/users/bibanon","html_url":"https://github.com/bibanon","followers_url":"https://api.github.com/users/bibanon/followers","following_url":"https://api.github.com/users/bibanon/following{/other_user}","gists_url":"https://api.github.com/users/bibanon/gists{/gist_id}","starred_url":"https://api.github.com/users/bibanon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bibanon/subscriptions","organizations_url":"https://api.github.com/users/bibanon/orgs","repos_url":"https://api.github.com/users/bibanon/repos","events_url":"https://api.github.com/users/bibanon/events{/privacy}","received_events_url":"https://api.github.com/users/bibanon/received_events","type":"Organization","site_admin":false},"repo":{"id":47102279,"name":"BiliDan","full_name":"bibanon/BiliDan","owner":{"login":"bibanon","id":1455677,"avatar_url":"https://avatars.githubusercontent.com/u/1455677?v=3","gravatar_id":"","url":"https://api.github.com/users/bibanon","html_url":"https://github.com/bibanon","followers_url":"https://api.github.com/users/bibanon/followers","following_url":"https://api.github.com/users/bibanon/following{/other_user}","gists_url":"https://api.github.com/users/bibanon/gists{/gist_id}","starred_url":"https://api.github.com/users/bibanon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bibanon/subscriptions","organizations_url":"https://api.github.com/users/bibanon/orgs","repos_url":"https://api.github.com/users/bibanon/repos","events_url":"https://api.github.com/users/bibanon/events{/privacy}","received_events_url":"https://api.github.com/users/bibanon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bibanon/BiliDan","description":"Play videos on Bilibili.com with MPV and Danmaku2ASS","fork":true,"url":"https://api.github.com/repos/bibanon/BiliDan","forks_url":"https://api.github.com/repos/bibanon/BiliDan/forks","keys_url":"https://api.github.com/repos/bibanon/BiliDan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bibanon/BiliDan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bibanon/BiliDan/teams","hooks_url":"https://api.github.com/repos/bibanon/BiliDan/hooks","issue_events_url":"https://api.github.com/repos/bibanon/BiliDan/issues/events{/number}","events_url":"https://api.github.com/repos/bibanon/BiliDan/events","assignees_url":"https://api.github.com/repos/bibanon/BiliDan/assignees{/user}","branches_url":"https://api.github.com/repos/bibanon/BiliDan/branches{/branch}","tags_url":"https://api.github.com/repos/bibanon/BiliDan/tags","blobs_url":"https://api.github.com/repos/bibanon/BiliDan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bibanon/BiliDan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bibanon/BiliDan/git/refs{/sha}","trees_url":"https://api.github.com/repos/bibanon/BiliDan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bibanon/BiliDan/statuses/{sha}","languages_url":"https://api.github.com/repos/bibanon/BiliDan/languages","stargazers_url":"https://api.github.com/repos/bibanon/BiliDan/stargazers","contributors_url":"https://api.github.com/repos/bibanon/BiliDan/contributors","subscribers_url":"https://api.github.com/repos/bibanon/BiliDan/subscribers","subscription_url":"https://api.github.com/repos/bibanon/BiliDan/subscription","commits_url":"https://api.github.com/repos/bibanon/BiliDan/commits{/sha}","git_commits_url":"https://api.github.com/repos/bibanon/BiliDan/git/commits{/sha}","comments_url":"https://api.github.com/repos/bibanon/BiliDan/comments{/number}","issue_comment_url":"https://api.github.com/repos/bibanon/BiliDan/issues/comments{/number}","contents_url":"https://api.github.com/repos/bibanon/BiliDan/contents/{+path}","compare_url":"https://api.github.com/repos/bibanon/BiliDan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bibanon/BiliDan/merges","archive_url":"https://api.github.com/repos/bibanon/BiliDan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bibanon/BiliDan/downloads","issues_url":"https://api.github.com/repos/bibanon/BiliDan/issues{/number}","pulls_url":"https://api.github.com/repos/bibanon/BiliDan/pulls{/number}","milestones_url":"https://api.github.com/repos/bibanon/BiliDan/milestones{/number}","notifications_url":"https://api.github.com/repos/bibanon/BiliDan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bibanon/BiliDan/labels{/name}","releases_url":"https://api.github.com/repos/bibanon/BiliDan/releases{/id}","created_at":"2015-11-30T07:29:00Z","updated_at":"2015-11-30T07:29:01Z","pushed_at":"2015-11-30T07:37:34Z","git_url":"git://github.com/bibanon/BiliDan.git","ssh_url":"git@github.com:bibanon/BiliDan.git","clone_url":"https://github.com/bibanon/BiliDan.git","svn_url":"https://github.com/bibanon/BiliDan","homepage":"http://m13253.blogspot.com/2014/06/watch-bilibili-with-biligrab-danmaku2ass.html","size":108,"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":"m13253:master","ref":"master","sha":"a2756bf771f4dfe73a2b9778c9ab14d1f7034f8e","user":{"login":"m13253","id":1808930,"avatar_url":"https://avatars.githubusercontent.com/u/1808930?v=3","gravatar_id":"","url":"https://api.github.com/users/m13253","html_url":"https://github.com/m13253","followers_url":"https://api.github.com/users/m13253/followers","following_url":"https://api.github.com/users/m13253/following{/other_user}","gists_url":"https://api.github.com/users/m13253/gists{/gist_id}","starred_url":"https://api.github.com/users/m13253/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m13253/subscriptions","organizations_url":"https://api.github.com/users/m13253/orgs","repos_url":"https://api.github.com/users/m13253/repos","events_url":"https://api.github.com/users/m13253/events{/privacy}","received_events_url":"https://api.github.com/users/m13253/received_events","type":"User","site_admin":false},"repo":{"id":20830941,"name":"BiliDan","full_name":"m13253/BiliDan","owner":{"login":"m13253","id":1808930,"avatar_url":"https://avatars.githubusercontent.com/u/1808930?v=3","gravatar_id":"","url":"https://api.github.com/users/m13253","html_url":"https://github.com/m13253","followers_url":"https://api.github.com/users/m13253/followers","following_url":"https://api.github.com/users/m13253/following{/other_user}","gists_url":"https://api.github.com/users/m13253/gists{/gist_id}","starred_url":"https://api.github.com/users/m13253/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m13253/subscriptions","organizations_url":"https://api.github.com/users/m13253/orgs","repos_url":"https://api.github.com/users/m13253/repos","events_url":"https://api.github.com/users/m13253/events{/privacy}","received_events_url":"https://api.github.com/users/m13253/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/m13253/BiliDan","description":"Play videos on Bilibili.com with MPV and Danmaku2ASS","fork":false,"url":"https://api.github.com/repos/m13253/BiliDan","forks_url":"https://api.github.com/repos/m13253/BiliDan/forks","keys_url":"https://api.github.com/repos/m13253/BiliDan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m13253/BiliDan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m13253/BiliDan/teams","hooks_url":"https://api.github.com/repos/m13253/BiliDan/hooks","issue_events_url":"https://api.github.com/repos/m13253/BiliDan/issues/events{/number}","events_url":"https://api.github.com/repos/m13253/BiliDan/events","assignees_url":"https://api.github.com/repos/m13253/BiliDan/assignees{/user}","branches_url":"https://api.github.com/repos/m13253/BiliDan/branches{/branch}","tags_url":"https://api.github.com/repos/m13253/BiliDan/tags","blobs_url":"https://api.github.com/repos/m13253/BiliDan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m13253/BiliDan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m13253/BiliDan/git/refs{/sha}","trees_url":"https://api.github.com/repos/m13253/BiliDan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m13253/BiliDan/statuses/{sha}","languages_url":"https://api.github.com/repos/m13253/BiliDan/languages","stargazers_url":"https://api.github.com/repos/m13253/BiliDan/stargazers","contributors_url":"https://api.github.com/repos/m13253/BiliDan/contributors","subscribers_url":"https://api.github.com/repos/m13253/BiliDan/subscribers","subscription_url":"https://api.github.com/repos/m13253/BiliDan/subscription","commits_url":"https://api.github.com/repos/m13253/BiliDan/commits{/sha}","git_commits_url":"https://api.github.com/repos/m13253/BiliDan/git/commits{/sha}","comments_url":"https://api.github.com/repos/m13253/BiliDan/comments{/number}","issue_comment_url":"https://api.github.com/repos/m13253/BiliDan/issues/comments{/number}","contents_url":"https://api.github.com/repos/m13253/BiliDan/contents/{+path}","compare_url":"https://api.github.com/repos/m13253/BiliDan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m13253/BiliDan/merges","archive_url":"https://api.github.com/repos/m13253/BiliDan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m13253/BiliDan/downloads","issues_url":"https://api.github.com/repos/m13253/BiliDan/issues{/number}","pulls_url":"https://api.github.com/repos/m13253/BiliDan/pulls{/number}","milestones_url":"https://api.github.com/repos/m13253/BiliDan/milestones{/number}","notifications_url":"https://api.github.com/repos/m13253/BiliDan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m13253/BiliDan/labels{/name}","releases_url":"https://api.github.com/repos/m13253/BiliDan/releases{/id}","created_at":"2014-06-14T11:42:35Z","updated_at":"2015-11-29T12:31:27Z","pushed_at":"2015-10-06T01:38:07Z","git_url":"git://github.com/m13253/BiliDan.git","ssh_url":"git@github.com:m13253/BiliDan.git","clone_url":"https://github.com/m13253/BiliDan.git","svn_url":"https://github.com/m13253/BiliDan","homepage":"http://m13253.blogspot.com/2014/06/watch-bilibili-with-biligrab-danmaku2ass.html","size":738,"stargazers_count":186,"watchers_count":186,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":3,"forks":42,"open_issues":3,"watchers":186,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/m13253/BiliDan/pulls/42"},"html":{"href":"https://github.com/m13253/BiliDan/pull/42"},"issue":{"href":"https://api.github.com/repos/m13253/BiliDan/issues/42"},"comments":{"href":"https://api.github.com/repos/m13253/BiliDan/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/m13253/BiliDan/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/m13253/BiliDan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/m13253/BiliDan/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/m13253/BiliDan/statuses/856bac1aaa85b0a2c8a3b2e50028928a766a117f"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":38,"deletions":4,"changed_files":2}}