{"action":"created","comment":{"url":"https://api.github.com/repos/pymedusa/Medusa/pulls/comments/183044591","pull_request_review_id":113969304,"id":183044591,"diff_hunk":"@@ -54,17 +56,63 @@ def _get_auth(self):\n             return self.auth\n \n     def _add_torrent_uri(self, result):\n-        return self._request(params={\n+            ## Set proper subfoler as destination for uTorrent \n+            series_id = result.series.series_id\n+            series_name = result.series.name\n+ \n+\t\t\t# Get the sub-folder the user has assigned to that series\n+            root_dirs = app.ROOT_DIRS\n+            root_location = root_dirs[int(root_dirs[0]) + 1]\n+            torrent_path = result.series._location\n+            torrent_subfolder = None\n+\n+            if not root_location == torrent_path:\n+                torrent_subfolder = os.path.basename(torrent_path)\n+\t        ## Use the label if tyhere is no subfolder\n+            else:\n+                torrent_subfolder = series_name\n+\n+            log.info('Show {name}: torrent snatched, download destination folder is: {path} (sub-folder: {sub})',\n+                    {'name': series_name, 'path': torrent_path, 'sub': torrent_subfolder})\n+\n+\n+            return self._request(params={\n             'action': 'add-url',\n             # limit the param length to 1024 chars (uTorrent bug)\n             's': result.url[:1024],\n+\t\t\t## add torrent path to request\n+\t\t\t#   ","path":"medusa/clients/torrent/utorrent_client.py","position":39,"original_position":39,"commit_id":"aeff46ed0aeeb5be91187be9e7b457800e28c0c9","original_commit_id":"aeff46ed0aeeb5be91187be9e7b457800e28c0c9","user":{"login":"medariox","id":2893509,"avatar_url":"https://avatars0.githubusercontent.com/u/2893509?v=4","gravatar_id":"","url":"https://api.github.com/users/medariox","html_url":"https://github.com/medariox","followers_url":"https://api.github.com/users/medariox/followers","following_url":"https://api.github.com/users/medariox/following{/other_user}","gists_url":"https://api.github.com/users/medariox/gists{/gist_id}","starred_url":"https://api.github.com/users/medariox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/medariox/subscriptions","organizations_url":"https://api.github.com/users/medariox/orgs","repos_url":"https://api.github.com/users/medariox/repos","events_url":"https://api.github.com/users/medariox/events{/privacy}","received_events_url":"https://api.github.com/users/medariox/received_events","type":"User","site_admin":false},"body":"Superfluous `#`.","created_at":"2018-04-20T13:10:20Z","updated_at":"2018-04-20T13:12:54Z","html_url":"https://github.com/pymedusa/Medusa/pull/4005#discussion_r183044591","pull_request_url":"https://api.github.com/repos/pymedusa/Medusa/pulls/4005","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/pymedusa/Medusa/pulls/comments/183044591"},"html":{"href":"https://github.com/pymedusa/Medusa/pull/4005#discussion_r183044591"},"pull_request":{"href":"https://api.github.com/repos/pymedusa/Medusa/pulls/4005"}}},"pull_request":{"url":"https://api.github.com/repos/pymedusa/Medusa/pulls/4005","id":181189931,"html_url":"https://github.com/pymedusa/Medusa/pull/4005","diff_url":"https://github.com/pymedusa/Medusa/pull/4005.diff","patch_url":"https://github.com/pymedusa/Medusa/pull/4005.patch","issue_url":"https://api.github.com/repos/pymedusa/Medusa/issues/4005","number":4005,"state":"open","locked":false,"title":"Missing torrent download path in WebUI command to uTorrent (per issue #3963); Add optional dynamic/per-show label for uTorrent; fix WebUI for seeding time set as \"-1\" (disabled)","user":{"login":"rafi-d","id":2458280,"avatar_url":"https://avatars2.githubusercontent.com/u/2458280?v=4","gravatar_id":"","url":"https://api.github.com/users/rafi-d","html_url":"https://github.com/rafi-d","followers_url":"https://api.github.com/users/rafi-d/followers","following_url":"https://api.github.com/users/rafi-d/following{/other_user}","gists_url":"https://api.github.com/users/rafi-d/gists{/gist_id}","starred_url":"https://api.github.com/users/rafi-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafi-d/subscriptions","organizations_url":"https://api.github.com/users/rafi-d/orgs","repos_url":"https://api.github.com/users/rafi-d/repos","events_url":"https://api.github.com/users/rafi-d/events{/privacy}","received_events_url":"https://api.github.com/users/rafi-d/received_events","type":"User","site_admin":false},"body":"1. Change/fix for  uTorrent \"snatches\" to be directed to the exact download destination sub-folder location, based on that destination defined in Medusa. If there was no destination defined, we'll use the show NAME as destination sub-folder (this is commented in the source)\r\n\r\n2. Add an option to use per-show label, by using \"%N\" notation in the search->utorrent->label(s) edit-boxes. This can be \"mixed\" with other text like \"tv-Medusa_%N\" . Description text is also added to the GUI for the three themes .\r\n\r\nThanks\r\n\r\n","created_at":"2018-04-12T12:42:28Z","updated_at":"2018-04-20T13:12:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb3b7226ceee040988eb5366cf95274fdd6b9870","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pymedusa/Medusa/pulls/4005/commits","review_comments_url":"https://api.github.com/repos/pymedusa/Medusa/pulls/4005/comments","review_comment_url":"https://api.github.com/repos/pymedusa/Medusa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pymedusa/Medusa/issues/4005/comments","statuses_url":"https://api.github.com/repos/pymedusa/Medusa/statuses/aeff46ed0aeeb5be91187be9e7b457800e28c0c9","head":{"label":"rafi-d:master","ref":"master","sha":"aeff46ed0aeeb5be91187be9e7b457800e28c0c9","user":{"login":"rafi-d","id":2458280,"avatar_url":"https://avatars2.githubusercontent.com/u/2458280?v=4","gravatar_id":"","url":"https://api.github.com/users/rafi-d","html_url":"https://github.com/rafi-d","followers_url":"https://api.github.com/users/rafi-d/followers","following_url":"https://api.github.com/users/rafi-d/following{/other_user}","gists_url":"https://api.github.com/users/rafi-d/gists{/gist_id}","starred_url":"https://api.github.com/users/rafi-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafi-d/subscriptions","organizations_url":"https://api.github.com/users/rafi-d/orgs","repos_url":"https://api.github.com/users/rafi-d/repos","events_url":"https://api.github.com/users/rafi-d/events{/privacy}","received_events_url":"https://api.github.com/users/rafi-d/received_events","type":"User","site_admin":false},"repo":{"id":129241718,"name":"Medusa","full_name":"rafi-d/Medusa","owner":{"login":"rafi-d","id":2458280,"avatar_url":"https://avatars2.githubusercontent.com/u/2458280?v=4","gravatar_id":"","url":"https://api.github.com/users/rafi-d","html_url":"https://github.com/rafi-d","followers_url":"https://api.github.com/users/rafi-d/followers","following_url":"https://api.github.com/users/rafi-d/following{/other_user}","gists_url":"https://api.github.com/users/rafi-d/gists{/gist_id}","starred_url":"https://api.github.com/users/rafi-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafi-d/subscriptions","organizations_url":"https://api.github.com/users/rafi-d/orgs","repos_url":"https://api.github.com/users/rafi-d/repos","events_url":"https://api.github.com/users/rafi-d/events{/privacy}","received_events_url":"https://api.github.com/users/rafi-d/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rafi-d/Medusa","description":"Now with the most wanted feature: **Manual Search**. You can choose what to download! IRC: #pymedusa","fork":true,"url":"https://api.github.com/repos/rafi-d/Medusa","forks_url":"https://api.github.com/repos/rafi-d/Medusa/forks","keys_url":"https://api.github.com/repos/rafi-d/Medusa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rafi-d/Medusa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rafi-d/Medusa/teams","hooks_url":"https://api.github.com/repos/rafi-d/Medusa/hooks","issue_events_url":"https://api.github.com/repos/rafi-d/Medusa/issues/events{/number}","events_url":"https://api.github.com/repos/rafi-d/Medusa/events","assignees_url":"https://api.github.com/repos/rafi-d/Medusa/assignees{/user}","branches_url":"https://api.github.com/repos/rafi-d/Medusa/branches{/branch}","tags_url":"https://api.github.com/repos/rafi-d/Medusa/tags","blobs_url":"https://api.github.com/repos/rafi-d/Medusa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rafi-d/Medusa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rafi-d/Medusa/git/refs{/sha}","trees_url":"https://api.github.com/repos/rafi-d/Medusa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rafi-d/Medusa/statuses/{sha}","languages_url":"https://api.github.com/repos/rafi-d/Medusa/languages","stargazers_url":"https://api.github.com/repos/rafi-d/Medusa/stargazers","contributors_url":"https://api.github.com/repos/rafi-d/Medusa/contributors","subscribers_url":"https://api.github.com/repos/rafi-d/Medusa/subscribers","subscription_url":"https://api.github.com/repos/rafi-d/Medusa/subscription","commits_url":"https://api.github.com/repos/rafi-d/Medusa/commits{/sha}","git_commits_url":"https://api.github.com/repos/rafi-d/Medusa/git/commits{/sha}","comments_url":"https://api.github.com/repos/rafi-d/Medusa/comments{/number}","issue_comment_url":"https://api.github.com/repos/rafi-d/Medusa/issues/comments{/number}","contents_url":"https://api.github.com/repos/rafi-d/Medusa/contents/{+path}","compare_url":"https://api.github.com/repos/rafi-d/Medusa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rafi-d/Medusa/merges","archive_url":"https://api.github.com/repos/rafi-d/Medusa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rafi-d/Medusa/downloads","issues_url":"https://api.github.com/repos/rafi-d/Medusa/issues{/number}","pulls_url":"https://api.github.com/repos/rafi-d/Medusa/pulls{/number}","milestones_url":"https://api.github.com/repos/rafi-d/Medusa/milestones{/number}","notifications_url":"https://api.github.com/repos/rafi-d/Medusa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rafi-d/Medusa/labels{/name}","releases_url":"https://api.github.com/repos/rafi-d/Medusa/releases{/id}","deployments_url":"https://api.github.com/repos/rafi-d/Medusa/deployments","created_at":"2018-04-12T11:38:02Z","updated_at":"2018-04-20T07:10:28Z","pushed_at":"2018-04-20T07:10:26Z","git_url":"git://github.com/rafi-d/Medusa.git","ssh_url":"git@github.com:rafi-d/Medusa.git","clone_url":"https://github.com/rafi-d/Medusa.git","svn_url":"https://github.com/rafi-d/Medusa","homepage":"","size":89080,"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":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pymedusa:develop","ref":"develop","sha":"e47aad8bdf5d0a9f3297a112da7005310d2f32e8","user":{"login":"pymedusa","id":16712498,"avatar_url":"https://avatars1.githubusercontent.com/u/16712498?v=4","gravatar_id":"","url":"https://api.github.com/users/pymedusa","html_url":"https://github.com/pymedusa","followers_url":"https://api.github.com/users/pymedusa/followers","following_url":"https://api.github.com/users/pymedusa/following{/other_user}","gists_url":"https://api.github.com/users/pymedusa/gists{/gist_id}","starred_url":"https://api.github.com/users/pymedusa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pymedusa/subscriptions","organizations_url":"https://api.github.com/users/pymedusa/orgs","repos_url":"https://api.github.com/users/pymedusa/repos","events_url":"https://api.github.com/users/pymedusa/events{/privacy}","received_events_url":"https://api.github.com/users/pymedusa/received_events","type":"Organization","site_admin":false},"repo":{"id":52334681,"name":"Medusa","full_name":"pymedusa/Medusa","owner":{"login":"pymedusa","id":16712498,"avatar_url":"https://avatars1.githubusercontent.com/u/16712498?v=4","gravatar_id":"","url":"https://api.github.com/users/pymedusa","html_url":"https://github.com/pymedusa","followers_url":"https://api.github.com/users/pymedusa/followers","following_url":"https://api.github.com/users/pymedusa/following{/other_user}","gists_url":"https://api.github.com/users/pymedusa/gists{/gist_id}","starred_url":"https://api.github.com/users/pymedusa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pymedusa/subscriptions","organizations_url":"https://api.github.com/users/pymedusa/orgs","repos_url":"https://api.github.com/users/pymedusa/repos","events_url":"https://api.github.com/users/pymedusa/events{/privacy}","received_events_url":"https://api.github.com/users/pymedusa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pymedusa/Medusa","description":"Now with the most wanted feature: **Manual Search**. You can choose what to download! IRC: #pymedusa","fork":false,"url":"https://api.github.com/repos/pymedusa/Medusa","forks_url":"https://api.github.com/repos/pymedusa/Medusa/forks","keys_url":"https://api.github.com/repos/pymedusa/Medusa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pymedusa/Medusa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pymedusa/Medusa/teams","hooks_url":"https://api.github.com/repos/pymedusa/Medusa/hooks","issue_events_url":"https://api.github.com/repos/pymedusa/Medusa/issues/events{/number}","events_url":"https://api.github.com/repos/pymedusa/Medusa/events","assignees_url":"https://api.github.com/repos/pymedusa/Medusa/assignees{/user}","branches_url":"https://api.github.com/repos/pymedusa/Medusa/branches{/branch}","tags_url":"https://api.github.com/repos/pymedusa/Medusa/tags","blobs_url":"https://api.github.com/repos/pymedusa/Medusa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pymedusa/Medusa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pymedusa/Medusa/git/refs{/sha}","trees_url":"https://api.github.com/repos/pymedusa/Medusa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pymedusa/Medusa/statuses/{sha}","languages_url":"https://api.github.com/repos/pymedusa/Medusa/languages","stargazers_url":"https://api.github.com/repos/pymedusa/Medusa/stargazers","contributors_url":"https://api.github.com/repos/pymedusa/Medusa/contributors","subscribers_url":"https://api.github.com/repos/pymedusa/Medusa/subscribers","subscription_url":"https://api.github.com/repos/pymedusa/Medusa/subscription","commits_url":"https://api.github.com/repos/pymedusa/Medusa/commits{/sha}","git_commits_url":"https://api.github.com/repos/pymedusa/Medusa/git/commits{/sha}","comments_url":"https://api.github.com/repos/pymedusa/Medusa/comments{/number}","issue_comment_url":"https://api.github.com/repos/pymedusa/Medusa/issues/comments{/number}","contents_url":"https://api.github.com/repos/pymedusa/Medusa/contents/{+path}","compare_url":"https://api.github.com/repos/pymedusa/Medusa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pymedusa/Medusa/merges","archive_url":"https://api.github.com/repos/pymedusa/Medusa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pymedusa/Medusa/downloads","issues_url":"https://api.github.com/repos/pymedusa/Medusa/issues{/number}","pulls_url":"https://api.github.com/repos/pymedusa/Medusa/pulls{/number}","milestones_url":"https://api.github.com/repos/pymedusa/Medusa/milestones{/number}","notifications_url":"https://api.github.com/repos/pymedusa/Medusa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pymedusa/Medusa/labels{/name}","releases_url":"https://api.github.com/repos/pymedusa/Medusa/releases{/id}","deployments_url":"https://api.github.com/repos/pymedusa/Medusa/deployments","created_at":"2016-02-23T06:02:11Z","updated_at":"2018-04-20T07:34:41Z","pushed_at":"2018-04-20T12:24:02Z","git_url":"git://github.com/pymedusa/Medusa.git","ssh_url":"git@github.com:pymedusa/Medusa.git","clone_url":"https://github.com/pymedusa/Medusa.git","svn_url":"https://github.com/pymedusa/Medusa","homepage":"","size":89793,"stargazers_count":303,"watchers_count":303,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":63,"mirror_url":null,"archived":false,"open_issues_count":215,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":63,"open_issues":215,"watchers":303,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pymedusa/Medusa/pulls/4005"},"html":{"href":"https://github.com/pymedusa/Medusa/pull/4005"},"issue":{"href":"https://api.github.com/repos/pymedusa/Medusa/issues/4005"},"comments":{"href":"https://api.github.com/repos/pymedusa/Medusa/issues/4005/comments"},"review_comments":{"href":"https://api.github.com/repos/pymedusa/Medusa/pulls/4005/comments"},"review_comment":{"href":"https://api.github.com/repos/pymedusa/Medusa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pymedusa/Medusa/pulls/4005/commits"},"statuses":{"href":"https://api.github.com/repos/pymedusa/Medusa/statuses/aeff46ed0aeeb5be91187be9e7b457800e28c0c9"}},"author_association":"NONE"}}
{"actor":{"display_login":"medariox"}}