{"action":"created","comment":{"url":"https://api.github.com/repos/zigg/fediplay/pulls/comments/165824962","pull_request_review_id":93826806,"id":165824962,"diff_hunk":"@@ -53,9 +53,12 @@ def get(self, url):\n             'nocheckcertificate': 'FEDIPLAY_NO_CHECK_CERTIFICATE' in environ,\n             'progress_hooks': [self._progress_hook]\n         }\n-        with YoutubeDL(options) as downloader:\n-            downloader.download([url])\n-\n+        try:\n+            with YoutubeDL(options) as downloader:\n+                downloader.download([url])\n+        except Exception:\n+            print(\"YoutubeDL couldn't download \"+url+\" for you. That might not be a valid link or you might be having connection issues.\")\n+            self.filename=\"\"","path":"fediplay.py","position":29,"original_position":29,"commit_id":"228f558ae7d42b1ea3eb837167cbbd4c02148419","original_commit_id":"228f558ae7d42b1ea3eb837167cbbd4c02148419","user":{"login":"zigg","id":56017,"avatar_url":"https://avatars3.githubusercontent.com/u/56017?v=4","gravatar_id":"","url":"https://api.github.com/users/zigg","html_url":"https://github.com/zigg","followers_url":"https://api.github.com/users/zigg/followers","following_url":"https://api.github.com/users/zigg/following{/other_user}","gists_url":"https://api.github.com/users/zigg/gists{/gist_id}","starred_url":"https://api.github.com/users/zigg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zigg/subscriptions","organizations_url":"https://api.github.com/users/zigg/orgs","repos_url":"https://api.github.com/users/zigg/repos","events_url":"https://api.github.com/users/zigg/events{/privacy}","received_events_url":"https://api.github.com/users/zigg/received_events","type":"User","site_admin":false},"body":"This is too deep to handle the exception—setting `self.filename` to an empty string (essentially a magic value) is evidence of this.\r\n\r\nI'd rather see the exception bubble up and be handled at the `StreamListener.on_update` level, and then fix #3 by checking all URLs until youtube-dl successfully handles one.","created_at":"2018-02-03T20:42:39Z","updated_at":"2018-02-03T20:43:42Z","html_url":"https://github.com/zigg/fediplay/pull/12#discussion_r165824962","pull_request_url":"https://api.github.com/repos/zigg/fediplay/pulls/12","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/zigg/fediplay/pulls/comments/165824962"},"html":{"href":"https://github.com/zigg/fediplay/pull/12#discussion_r165824962"},"pull_request":{"href":"https://api.github.com/repos/zigg/fediplay/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/zigg/fediplay/pulls/12","id":166435773,"html_url":"https://github.com/zigg/fediplay/pull/12","diff_url":"https://github.com/zigg/fediplay/pull/12.diff","patch_url":"https://github.com/zigg/fediplay/pull/12.patch","issue_url":"https://api.github.com/repos/zigg/fediplay/issues/12","number":12,"state":"open","locked":false,"title":"Catches and handles YoutubeDL errors","user":{"login":"bowlercaptain","id":2024824,"avatar_url":"https://avatars2.githubusercontent.com/u/2024824?v=4","gravatar_id":"","url":"https://api.github.com/users/bowlercaptain","html_url":"https://github.com/bowlercaptain","followers_url":"https://api.github.com/users/bowlercaptain/followers","following_url":"https://api.github.com/users/bowlercaptain/following{/other_user}","gists_url":"https://api.github.com/users/bowlercaptain/gists{/gist_id}","starred_url":"https://api.github.com/users/bowlercaptain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bowlercaptain/subscriptions","organizations_url":"https://api.github.com/users/bowlercaptain/orgs","repos_url":"https://api.github.com/users/bowlercaptain/repos","events_url":"https://api.github.com/users/bowlercaptain/events{/privacy}","received_events_url":"https://api.github.com/users/bowlercaptain/received_events","type":"User","site_admin":false},"body":"prints an error message and doesn't queue or play the file.\r\n\r\n\r\nSolves [bad url crashes](https://github.com/zigg/fediplay/issues/11), remediates without *really* solving [the playable issue](https://github.com/zigg/fediplay/issues/3). ","created_at":"2018-02-01T03:33:56Z","updated_at":"2018-02-03T20:43:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"91e230bf876a112652e6bc7bc696299b1f15bb7c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/zigg/fediplay/pulls/12/commits","review_comments_url":"https://api.github.com/repos/zigg/fediplay/pulls/12/comments","review_comment_url":"https://api.github.com/repos/zigg/fediplay/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zigg/fediplay/issues/12/comments","statuses_url":"https://api.github.com/repos/zigg/fediplay/statuses/228f558ae7d42b1ea3eb837167cbbd4c02148419","head":{"label":"bowlercaptain:master","ref":"master","sha":"228f558ae7d42b1ea3eb837167cbbd4c02148419","user":{"login":"bowlercaptain","id":2024824,"avatar_url":"https://avatars2.githubusercontent.com/u/2024824?v=4","gravatar_id":"","url":"https://api.github.com/users/bowlercaptain","html_url":"https://github.com/bowlercaptain","followers_url":"https://api.github.com/users/bowlercaptain/followers","following_url":"https://api.github.com/users/bowlercaptain/following{/other_user}","gists_url":"https://api.github.com/users/bowlercaptain/gists{/gist_id}","starred_url":"https://api.github.com/users/bowlercaptain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bowlercaptain/subscriptions","organizations_url":"https://api.github.com/users/bowlercaptain/orgs","repos_url":"https://api.github.com/users/bowlercaptain/repos","events_url":"https://api.github.com/users/bowlercaptain/events{/privacy}","received_events_url":"https://api.github.com/users/bowlercaptain/received_events","type":"User","site_admin":false},"repo":{"id":118308478,"name":"fediplay","full_name":"bowlercaptain/fediplay","owner":{"login":"bowlercaptain","id":2024824,"avatar_url":"https://avatars2.githubusercontent.com/u/2024824?v=4","gravatar_id":"","url":"https://api.github.com/users/bowlercaptain","html_url":"https://github.com/bowlercaptain","followers_url":"https://api.github.com/users/bowlercaptain/followers","following_url":"https://api.github.com/users/bowlercaptain/following{/other_user}","gists_url":"https://api.github.com/users/bowlercaptain/gists{/gist_id}","starred_url":"https://api.github.com/users/bowlercaptain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bowlercaptain/subscriptions","organizations_url":"https://api.github.com/users/bowlercaptain/orgs","repos_url":"https://api.github.com/users/bowlercaptain/repos","events_url":"https://api.github.com/users/bowlercaptain/events{/privacy}","received_events_url":"https://api.github.com/users/bowlercaptain/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bowlercaptain/fediplay","description":"a Mastodon client that automatically plays your friends' music","fork":true,"url":"https://api.github.com/repos/bowlercaptain/fediplay","forks_url":"https://api.github.com/repos/bowlercaptain/fediplay/forks","keys_url":"https://api.github.com/repos/bowlercaptain/fediplay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bowlercaptain/fediplay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bowlercaptain/fediplay/teams","hooks_url":"https://api.github.com/repos/bowlercaptain/fediplay/hooks","issue_events_url":"https://api.github.com/repos/bowlercaptain/fediplay/issues/events{/number}","events_url":"https://api.github.com/repos/bowlercaptain/fediplay/events","assignees_url":"https://api.github.com/repos/bowlercaptain/fediplay/assignees{/user}","branches_url":"https://api.github.com/repos/bowlercaptain/fediplay/branches{/branch}","tags_url":"https://api.github.com/repos/bowlercaptain/fediplay/tags","blobs_url":"https://api.github.com/repos/bowlercaptain/fediplay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bowlercaptain/fediplay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bowlercaptain/fediplay/git/refs{/sha}","trees_url":"https://api.github.com/repos/bowlercaptain/fediplay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bowlercaptain/fediplay/statuses/{sha}","languages_url":"https://api.github.com/repos/bowlercaptain/fediplay/languages","stargazers_url":"https://api.github.com/repos/bowlercaptain/fediplay/stargazers","contributors_url":"https://api.github.com/repos/bowlercaptain/fediplay/contributors","subscribers_url":"https://api.github.com/repos/bowlercaptain/fediplay/subscribers","subscription_url":"https://api.github.com/repos/bowlercaptain/fediplay/subscription","commits_url":"https://api.github.com/repos/bowlercaptain/fediplay/commits{/sha}","git_commits_url":"https://api.github.com/repos/bowlercaptain/fediplay/git/commits{/sha}","comments_url":"https://api.github.com/repos/bowlercaptain/fediplay/comments{/number}","issue_comment_url":"https://api.github.com/repos/bowlercaptain/fediplay/issues/comments{/number}","contents_url":"https://api.github.com/repos/bowlercaptain/fediplay/contents/{+path}","compare_url":"https://api.github.com/repos/bowlercaptain/fediplay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bowlercaptain/fediplay/merges","archive_url":"https://api.github.com/repos/bowlercaptain/fediplay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bowlercaptain/fediplay/downloads","issues_url":"https://api.github.com/repos/bowlercaptain/fediplay/issues{/number}","pulls_url":"https://api.github.com/repos/bowlercaptain/fediplay/pulls{/number}","milestones_url":"https://api.github.com/repos/bowlercaptain/fediplay/milestones{/number}","notifications_url":"https://api.github.com/repos/bowlercaptain/fediplay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bowlercaptain/fediplay/labels{/name}","releases_url":"https://api.github.com/repos/bowlercaptain/fediplay/releases{/id}","deployments_url":"https://api.github.com/repos/bowlercaptain/fediplay/deployments","created_at":"2018-01-21T05:48:35Z","updated_at":"2018-01-21T05:48:36Z","pushed_at":"2018-02-01T03:30:55Z","git_url":"git://github.com/bowlercaptain/fediplay.git","ssh_url":"git@github.com:bowlercaptain/fediplay.git","clone_url":"https://github.com/bowlercaptain/fediplay.git","svn_url":"https://github.com/bowlercaptain/fediplay","homepage":null,"size":18,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"zigg:master","ref":"master","sha":"1be7fa445416438fc6229f683ef5e038e315d7b4","user":{"login":"zigg","id":56017,"avatar_url":"https://avatars3.githubusercontent.com/u/56017?v=4","gravatar_id":"","url":"https://api.github.com/users/zigg","html_url":"https://github.com/zigg","followers_url":"https://api.github.com/users/zigg/followers","following_url":"https://api.github.com/users/zigg/following{/other_user}","gists_url":"https://api.github.com/users/zigg/gists{/gist_id}","starred_url":"https://api.github.com/users/zigg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zigg/subscriptions","organizations_url":"https://api.github.com/users/zigg/orgs","repos_url":"https://api.github.com/users/zigg/repos","events_url":"https://api.github.com/users/zigg/events{/privacy}","received_events_url":"https://api.github.com/users/zigg/received_events","type":"User","site_admin":false},"repo":{"id":115456503,"name":"fediplay","full_name":"zigg/fediplay","owner":{"login":"zigg","id":56017,"avatar_url":"https://avatars3.githubusercontent.com/u/56017?v=4","gravatar_id":"","url":"https://api.github.com/users/zigg","html_url":"https://github.com/zigg","followers_url":"https://api.github.com/users/zigg/followers","following_url":"https://api.github.com/users/zigg/following{/other_user}","gists_url":"https://api.github.com/users/zigg/gists{/gist_id}","starred_url":"https://api.github.com/users/zigg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zigg/subscriptions","organizations_url":"https://api.github.com/users/zigg/orgs","repos_url":"https://api.github.com/users/zigg/repos","events_url":"https://api.github.com/users/zigg/events{/privacy}","received_events_url":"https://api.github.com/users/zigg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zigg/fediplay","description":"a Mastodon client that automatically plays your friends' music","fork":false,"url":"https://api.github.com/repos/zigg/fediplay","forks_url":"https://api.github.com/repos/zigg/fediplay/forks","keys_url":"https://api.github.com/repos/zigg/fediplay/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zigg/fediplay/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zigg/fediplay/teams","hooks_url":"https://api.github.com/repos/zigg/fediplay/hooks","issue_events_url":"https://api.github.com/repos/zigg/fediplay/issues/events{/number}","events_url":"https://api.github.com/repos/zigg/fediplay/events","assignees_url":"https://api.github.com/repos/zigg/fediplay/assignees{/user}","branches_url":"https://api.github.com/repos/zigg/fediplay/branches{/branch}","tags_url":"https://api.github.com/repos/zigg/fediplay/tags","blobs_url":"https://api.github.com/repos/zigg/fediplay/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zigg/fediplay/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zigg/fediplay/git/refs{/sha}","trees_url":"https://api.github.com/repos/zigg/fediplay/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zigg/fediplay/statuses/{sha}","languages_url":"https://api.github.com/repos/zigg/fediplay/languages","stargazers_url":"https://api.github.com/repos/zigg/fediplay/stargazers","contributors_url":"https://api.github.com/repos/zigg/fediplay/contributors","subscribers_url":"https://api.github.com/repos/zigg/fediplay/subscribers","subscription_url":"https://api.github.com/repos/zigg/fediplay/subscription","commits_url":"https://api.github.com/repos/zigg/fediplay/commits{/sha}","git_commits_url":"https://api.github.com/repos/zigg/fediplay/git/commits{/sha}","comments_url":"https://api.github.com/repos/zigg/fediplay/comments{/number}","issue_comment_url":"https://api.github.com/repos/zigg/fediplay/issues/comments{/number}","contents_url":"https://api.github.com/repos/zigg/fediplay/contents/{+path}","compare_url":"https://api.github.com/repos/zigg/fediplay/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zigg/fediplay/merges","archive_url":"https://api.github.com/repos/zigg/fediplay/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zigg/fediplay/downloads","issues_url":"https://api.github.com/repos/zigg/fediplay/issues{/number}","pulls_url":"https://api.github.com/repos/zigg/fediplay/pulls{/number}","milestones_url":"https://api.github.com/repos/zigg/fediplay/milestones{/number}","notifications_url":"https://api.github.com/repos/zigg/fediplay/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zigg/fediplay/labels{/name}","releases_url":"https://api.github.com/repos/zigg/fediplay/releases{/id}","deployments_url":"https://api.github.com/repos/zigg/fediplay/deployments","created_at":"2017-12-26T21:36:07Z","updated_at":"2018-01-31T20:17:01Z","pushed_at":"2018-02-01T03:33:57Z","git_url":"git://github.com/zigg/fediplay.git","ssh_url":"git@github.com:zigg/fediplay.git","clone_url":"https://github.com/zigg/fediplay.git","svn_url":"https://github.com/zigg/fediplay","homepage":null,"size":17,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":3,"open_issues":7,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zigg/fediplay/pulls/12"},"html":{"href":"https://github.com/zigg/fediplay/pull/12"},"issue":{"href":"https://api.github.com/repos/zigg/fediplay/issues/12"},"comments":{"href":"https://api.github.com/repos/zigg/fediplay/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/zigg/fediplay/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/zigg/fediplay/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zigg/fediplay/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/zigg/fediplay/statuses/228f558ae7d42b1ea3eb837167cbbd4c02148419"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"zigg"}}