{"action":"opened","number":60,"pull_request":{"url":"https://api.github.com/repos/norkunas/youtube-dl-php/pulls/60","id":167032823,"html_url":"https://github.com/norkunas/youtube-dl-php/pull/60","diff_url":"https://github.com/norkunas/youtube-dl-php/pull/60.diff","patch_url":"https://github.com/norkunas/youtube-dl-php/pull/60.patch","issue_url":"https://api.github.com/repos/norkunas/youtube-dl-php/issues/60","number":60,"state":"open","locked":false,"title":"Allow \"output\" option to contain folders","user":{"login":"gnutix","id":310134,"avatar_url":"https://avatars1.githubusercontent.com/u/310134?v=4","gravatar_id":"","url":"https://api.github.com/users/gnutix","html_url":"https://github.com/gnutix","followers_url":"https://api.github.com/users/gnutix/followers","following_url":"https://api.github.com/users/gnutix/following{/other_user}","gists_url":"https://api.github.com/users/gnutix/gists{/gist_id}","starred_url":"https://api.github.com/users/gnutix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnutix/subscriptions","organizations_url":"https://api.github.com/users/gnutix/orgs","repos_url":"https://api.github.com/users/gnutix/repos","events_url":"https://api.github.com/users/gnutix/events{/privacy}","received_events_url":"https://api.github.com/users/gnutix/received_events","type":"User","site_admin":false},"body":"I wanted to save the downloaded file into a folder that would be named according to the video's metadata. So I changed my code to this :\r\n\r\n```\r\n$dl = new YoutubeDl([\r\n    'output' => $youtubeId.' (%(uploader)s, %(upload_date)s)/%(title)s.%(ext)s',\r\n]);\r\n$dl->setDownloadPath('downloads');\r\n$dl->download('https://www.youtube.com/watch?v='.$youtubeId);\r\n```\r\n\r\nSo here if I execute my script with `$youtubeId = 'JfgI3TB2MKs';` (https://www.youtube.com/watch?v=JfgI3TB2MKs) I will have the resulting tree in `downloads/` :\r\n\r\n```\r\n.\r\n├── JfgI3TB2MKs (Igor Presnyakov, 20130530)\r\n│   └── Hеrе Withоut Yоu - Igor Presnyakov - acoustic guitar.mp3\r\n```","created_at":"2018-02-04T22:05:14Z","updated_at":"2018-02-04T22:05:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/norkunas/youtube-dl-php/pulls/60/commits","review_comments_url":"https://api.github.com/repos/norkunas/youtube-dl-php/pulls/60/comments","review_comment_url":"https://api.github.com/repos/norkunas/youtube-dl-php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/norkunas/youtube-dl-php/issues/60/comments","statuses_url":"https://api.github.com/repos/norkunas/youtube-dl-php/statuses/0e50db56064d99c9b2062f52317132a846054433","head":{"label":"gnutix:patch-1","ref":"patch-1","sha":"0e50db56064d99c9b2062f52317132a846054433","user":{"login":"gnutix","id":310134,"avatar_url":"https://avatars1.githubusercontent.com/u/310134?v=4","gravatar_id":"","url":"https://api.github.com/users/gnutix","html_url":"https://github.com/gnutix","followers_url":"https://api.github.com/users/gnutix/followers","following_url":"https://api.github.com/users/gnutix/following{/other_user}","gists_url":"https://api.github.com/users/gnutix/gists{/gist_id}","starred_url":"https://api.github.com/users/gnutix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnutix/subscriptions","organizations_url":"https://api.github.com/users/gnutix/orgs","repos_url":"https://api.github.com/users/gnutix/repos","events_url":"https://api.github.com/users/gnutix/events{/privacy}","received_events_url":"https://api.github.com/users/gnutix/received_events","type":"User","site_admin":false},"repo":{"id":120227224,"name":"youtube-dl-php","full_name":"gnutix/youtube-dl-php","owner":{"login":"gnutix","id":310134,"avatar_url":"https://avatars1.githubusercontent.com/u/310134?v=4","gravatar_id":"","url":"https://api.github.com/users/gnutix","html_url":"https://github.com/gnutix","followers_url":"https://api.github.com/users/gnutix/followers","following_url":"https://api.github.com/users/gnutix/following{/other_user}","gists_url":"https://api.github.com/users/gnutix/gists{/gist_id}","starred_url":"https://api.github.com/users/gnutix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gnutix/subscriptions","organizations_url":"https://api.github.com/users/gnutix/orgs","repos_url":"https://api.github.com/users/gnutix/repos","events_url":"https://api.github.com/users/gnutix/events{/privacy}","received_events_url":"https://api.github.com/users/gnutix/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gnutix/youtube-dl-php","description":"Youtube-dl wrapper for PHP","fork":true,"url":"https://api.github.com/repos/gnutix/youtube-dl-php","forks_url":"https://api.github.com/repos/gnutix/youtube-dl-php/forks","keys_url":"https://api.github.com/repos/gnutix/youtube-dl-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gnutix/youtube-dl-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gnutix/youtube-dl-php/teams","hooks_url":"https://api.github.com/repos/gnutix/youtube-dl-php/hooks","issue_events_url":"https://api.github.com/repos/gnutix/youtube-dl-php/issues/events{/number}","events_url":"https://api.github.com/repos/gnutix/youtube-dl-php/events","assignees_url":"https://api.github.com/repos/gnutix/youtube-dl-php/assignees{/user}","branches_url":"https://api.github.com/repos/gnutix/youtube-dl-php/branches{/branch}","tags_url":"https://api.github.com/repos/gnutix/youtube-dl-php/tags","blobs_url":"https://api.github.com/repos/gnutix/youtube-dl-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gnutix/youtube-dl-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gnutix/youtube-dl-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/gnutix/youtube-dl-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gnutix/youtube-dl-php/statuses/{sha}","languages_url":"https://api.github.com/repos/gnutix/youtube-dl-php/languages","stargazers_url":"https://api.github.com/repos/gnutix/youtube-dl-php/stargazers","contributors_url":"https://api.github.com/repos/gnutix/youtube-dl-php/contributors","subscribers_url":"https://api.github.com/repos/gnutix/youtube-dl-php/subscribers","subscription_url":"https://api.github.com/repos/gnutix/youtube-dl-php/subscription","commits_url":"https://api.github.com/repos/gnutix/youtube-dl-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/gnutix/youtube-dl-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/gnutix/youtube-dl-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/gnutix/youtube-dl-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/gnutix/youtube-dl-php/contents/{+path}","compare_url":"https://api.github.com/repos/gnutix/youtube-dl-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gnutix/youtube-dl-php/merges","archive_url":"https://api.github.com/repos/gnutix/youtube-dl-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gnutix/youtube-dl-php/downloads","issues_url":"https://api.github.com/repos/gnutix/youtube-dl-php/issues{/number}","pulls_url":"https://api.github.com/repos/gnutix/youtube-dl-php/pulls{/number}","milestones_url":"https://api.github.com/repos/gnutix/youtube-dl-php/milestones{/number}","notifications_url":"https://api.github.com/repos/gnutix/youtube-dl-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gnutix/youtube-dl-php/labels{/name}","releases_url":"https://api.github.com/repos/gnutix/youtube-dl-php/releases{/id}","deployments_url":"https://api.github.com/repos/gnutix/youtube-dl-php/deployments","created_at":"2018-02-04T22:00:00Z","updated_at":"2018-02-04T22:00:01Z","pushed_at":"2018-02-04T22:04:42Z","git_url":"git://github.com/gnutix/youtube-dl-php.git","ssh_url":"git@github.com:gnutix/youtube-dl-php.git","clone_url":"https://github.com/gnutix/youtube-dl-php.git","svn_url":"https://github.com/gnutix/youtube-dl-php","homepage":null,"size":114,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"norkunas:master","ref":"master","sha":"2009bdec31ca257d6b4103147f6a63e25ac07da6","user":{"login":"norkunas","id":2722872,"avatar_url":"https://avatars3.githubusercontent.com/u/2722872?v=4","gravatar_id":"","url":"https://api.github.com/users/norkunas","html_url":"https://github.com/norkunas","followers_url":"https://api.github.com/users/norkunas/followers","following_url":"https://api.github.com/users/norkunas/following{/other_user}","gists_url":"https://api.github.com/users/norkunas/gists{/gist_id}","starred_url":"https://api.github.com/users/norkunas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norkunas/subscriptions","organizations_url":"https://api.github.com/users/norkunas/orgs","repos_url":"https://api.github.com/users/norkunas/repos","events_url":"https://api.github.com/users/norkunas/events{/privacy}","received_events_url":"https://api.github.com/users/norkunas/received_events","type":"User","site_admin":false},"repo":{"id":33054763,"name":"youtube-dl-php","full_name":"norkunas/youtube-dl-php","owner":{"login":"norkunas","id":2722872,"avatar_url":"https://avatars3.githubusercontent.com/u/2722872?v=4","gravatar_id":"","url":"https://api.github.com/users/norkunas","html_url":"https://github.com/norkunas","followers_url":"https://api.github.com/users/norkunas/followers","following_url":"https://api.github.com/users/norkunas/following{/other_user}","gists_url":"https://api.github.com/users/norkunas/gists{/gist_id}","starred_url":"https://api.github.com/users/norkunas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norkunas/subscriptions","organizations_url":"https://api.github.com/users/norkunas/orgs","repos_url":"https://api.github.com/users/norkunas/repos","events_url":"https://api.github.com/users/norkunas/events{/privacy}","received_events_url":"https://api.github.com/users/norkunas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/norkunas/youtube-dl-php","description":"Youtube-dl wrapper for PHP","fork":false,"url":"https://api.github.com/repos/norkunas/youtube-dl-php","forks_url":"https://api.github.com/repos/norkunas/youtube-dl-php/forks","keys_url":"https://api.github.com/repos/norkunas/youtube-dl-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/norkunas/youtube-dl-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/norkunas/youtube-dl-php/teams","hooks_url":"https://api.github.com/repos/norkunas/youtube-dl-php/hooks","issue_events_url":"https://api.github.com/repos/norkunas/youtube-dl-php/issues/events{/number}","events_url":"https://api.github.com/repos/norkunas/youtube-dl-php/events","assignees_url":"https://api.github.com/repos/norkunas/youtube-dl-php/assignees{/user}","branches_url":"https://api.github.com/repos/norkunas/youtube-dl-php/branches{/branch}","tags_url":"https://api.github.com/repos/norkunas/youtube-dl-php/tags","blobs_url":"https://api.github.com/repos/norkunas/youtube-dl-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/norkunas/youtube-dl-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/norkunas/youtube-dl-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/norkunas/youtube-dl-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/norkunas/youtube-dl-php/statuses/{sha}","languages_url":"https://api.github.com/repos/norkunas/youtube-dl-php/languages","stargazers_url":"https://api.github.com/repos/norkunas/youtube-dl-php/stargazers","contributors_url":"https://api.github.com/repos/norkunas/youtube-dl-php/contributors","subscribers_url":"https://api.github.com/repos/norkunas/youtube-dl-php/subscribers","subscription_url":"https://api.github.com/repos/norkunas/youtube-dl-php/subscription","commits_url":"https://api.github.com/repos/norkunas/youtube-dl-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/norkunas/youtube-dl-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/norkunas/youtube-dl-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/norkunas/youtube-dl-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/norkunas/youtube-dl-php/contents/{+path}","compare_url":"https://api.github.com/repos/norkunas/youtube-dl-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/norkunas/youtube-dl-php/merges","archive_url":"https://api.github.com/repos/norkunas/youtube-dl-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/norkunas/youtube-dl-php/downloads","issues_url":"https://api.github.com/repos/norkunas/youtube-dl-php/issues{/number}","pulls_url":"https://api.github.com/repos/norkunas/youtube-dl-php/pulls{/number}","milestones_url":"https://api.github.com/repos/norkunas/youtube-dl-php/milestones{/number}","notifications_url":"https://api.github.com/repos/norkunas/youtube-dl-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/norkunas/youtube-dl-php/labels{/name}","releases_url":"https://api.github.com/repos/norkunas/youtube-dl-php/releases{/id}","deployments_url":"https://api.github.com/repos/norkunas/youtube-dl-php/deployments","created_at":"2015-03-28T23:45:48Z","updated_at":"2018-01-25T18:06:04Z","pushed_at":"2018-01-12T05:32:14Z","git_url":"git://github.com/norkunas/youtube-dl-php.git","ssh_url":"git@github.com:norkunas/youtube-dl-php.git","clone_url":"https://github.com/norkunas/youtube-dl-php.git","svn_url":"https://github.com/norkunas/youtube-dl-php","homepage":null,"size":114,"stargazers_count":82,"watchers_count":82,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":37,"open_issues":14,"watchers":82,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/norkunas/youtube-dl-php/pulls/60"},"html":{"href":"https://github.com/norkunas/youtube-dl-php/pull/60"},"issue":{"href":"https://api.github.com/repos/norkunas/youtube-dl-php/issues/60"},"comments":{"href":"https://api.github.com/repos/norkunas/youtube-dl-php/issues/60/comments"},"review_comments":{"href":"https://api.github.com/repos/norkunas/youtube-dl-php/pulls/60/comments"},"review_comment":{"href":"https://api.github.com/repos/norkunas/youtube-dl-php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/norkunas/youtube-dl-php/pulls/60/commits"},"statuses":{"href":"https://api.github.com/repos/norkunas/youtube-dl-php/statuses/0e50db56064d99c9b2062f52317132a846054433"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":8,"deletions":5,"changed_files":1}}
{"actor":{"display_login":"gnutix"}}