GitHub PullRequestReviewCommentEvent at 2014-01-17 11:05:14
Repository: mpv
Actor: Nikoli
Payload: {"comment":{"url":"https://api.github.com/repos/mpv-player/mpv/pulls/comments/8962439","id":8962439,"diff_hunk":"@@ -0,0 +1,26 @@\n+#!/bin/sh\n+# Example of script for using mpv with youtube-dl\n+\n+cookies_dir=\"/tmp/.youtube-dl_mpv_$$\"\n+cookies_file=\"${cookies_dir}/cookies\"\n+user_agent=\"$(youtube-dl --dump-user-agent)\" # or set whatever you want\n+\n+rm -rf \"$cookies_dir\"\n+mkdir \"$cookies_dir\" || exit 1\n+chmod 0700 \"$cookies_dir\" || exit 1\n+\n+video_url=\"$(youtube-dl \\\n+--user-agent=\"$user_agent\" \\\n+--cookies=\"$cookies_file\" \\\n+--get-url \\\n+\"$1\")\"\n+\n+shift\n+\n+mpv \\\n+--cookies \\\n+--cookies-file=\"$cookies_file\" \\\n+--user-agent=\"$user_agent\" \\\n+${@} -- \"$video_url\"","path":"TOOLS/youtube-dl_mpv.sh","position":24,"original_position":24,"commit_id":"41e1b3f0648797308ab1878c808b16a24e9db35f","original_commit_id":"41e1b3f0648797308ab1878c808b16a24e9db35f","user":{"login":"Nikoli","id":444492,"avatar_url":"https://gravatar.com/avatar/11148e460f12c3e6908e03085895c6ce?d=https%3A%2F%2Fidenticons.github.com%2Fd4828382549eee8dc9d537fab9855af4.png&r=x","gravatar_id":"11148e460f12c3e6908e03085895c6ce","url":"https://api.github.com/users/Nikoli","html_url":"https://github.com/Nikoli","followers_url":"https://api.github.com/users/Nikoli/followers","following_url":"https://api.github.com/users/Nikoli/following{/other_user}","gists_url":"https://api.github.com/users/Nikoli/gists{/gist_id}","starred_url":"https://api.github.com/users/Nikoli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nikoli/subscriptions","organizations_url":"https://api.github.com/users/Nikoli/orgs","repos_url":"https://api.github.com/users/Nikoli/repos","events_url":"https://api.github.com/users/Nikoli/events{/privacy}","received_events_url":"https://api.github.com/users/Nikoli/received_events","type":"User","site_admin":false},"body":"If \"$@\" will be used instead of \"$1\" then it will not be possible to add mpv cli options like '-fs', also urls normally do not have spaces. Can you provide example of url working only when script has \"$@\" instead of \"$1\"?","created_at":"2014-01-17T11:05:14Z","updated_at":"2014-01-17T11:05:14Z","html_url":"https://github.com/mpv-player/mpv/pull/309#discussion_r8962439","pull_request_url":"https://api.github.com/repos/mpv-player/mpv/pulls/309","_links":{"self":{"href":"https://api.github.com/repos/mpv-player/mpv/pulls/comments/8962439"},"html":{"href":"https://github.com/mpv-player/mpv/pull/309#discussion_r8962439"},"pull_request":{"href":"https://api.github.com/repos/mpv-player/mpv/pulls/309"}}}}