{"action":"created","comment":{"url":"https://api.github.com/repos/pymedusa/SickRage/pulls/comments/79442097","id":79442097,"diff_hunk":"@@ -0,0 +1,148 @@\n+from __future__ import absolute_import\n+\n+from .filepost import encode_multipart_formdata\n+from .packages.six.moves.urllib.parse import urlencode\n+\n+\n+__all__ = ['RequestMethods']\n+\n+\n+class RequestMethods(object):\n+    \"\"\"\n+    Convenience mixin for classes who implement a :meth:`urlopen` method, such\n+    as :class:`~urllib3.connectionpool.HTTPConnectionPool` and\n+    :class:`~urllib3.poolmanager.PoolManager`.\n+\n+    Provides behavior for making common types of HTTP request methods and\n+    decides which type of request field encoding to use.\n+\n+    Specifically,\n+\n+    :meth:`.request_encode_url` is for sending requests whose fields are\n+    encoded in the URL (such as GET, HEAD, DELETE).\n+\n+    :meth:`.request_encode_body` is for sending requests whose fields are\n+    encoded in the *body* of the request using multipart or www-form-urlencoded\n+    (such as for POST, PUT, PATCH).\n+\n+    :meth:`.request` is for making any kind of request, it will look up the\n+    appropriate encoding format and use one of the above two methods to make\n+    the request.\n+\n+    Initializer parameters:\n+\n+    :param headers:\n+        Headers to include with all requests, unless other headers are given\n+        explicitly.\n+    \"\"\"\n+\n+    _encode_url_methods = set(['DELETE', 'GET', 'HEAD', 'OPTIONS'])\n+\n+    def __init__(self, headers=None):\n+        self.headers = headers or {}\n+\n+    def urlopen(self, method, url, body=None, headers=None,\n+                encode_multipart=True, multipart_boundary=None,\n+                **kw):  # Abstract\n+        raise NotImplemented(\"Classes extending RequestMethods must implement \"","path":"lib/urllib3/request.py","position":47,"original_position":47,"commit_id":"9e3644ddaedd4a72ed12bcadc668b37c22588210","original_commit_id":"9e3644ddaedd4a72ed12bcadc668b37c22588210","user":{"login":"codacy-bot","id":19940114,"avatar_url":"https://avatars.githubusercontent.com/u/19940114?v=3","gravatar_id":"","url":"https://api.github.com/users/codacy-bot","html_url":"https://github.com/codacy-bot","followers_url":"https://api.github.com/users/codacy-bot/followers","following_url":"https://api.github.com/users/codacy-bot/following{/other_user}","gists_url":"https://api.github.com/users/codacy-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/codacy-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codacy-bot/subscriptions","organizations_url":"https://api.github.com/users/codacy-bot/orgs","repos_url":"https://api.github.com/users/codacy-bot/repos","events_url":"https://api.github.com/users/codacy-bot/events{/privacy}","received_events_url":"https://api.github.com/users/codacy-bot/received_events","type":"User","site_admin":false},"body":"![Codacy](https://www.codacy.com/assets/images/favicon.png) Issue found: [NotImplemented is not callable](https://www.codacy.com/app/fernandog/SickRage/file/3961893889/issues/source?bid=3722120&fileBranchId=3722135#l47)","created_at":"2016-09-19T17:19:50Z","updated_at":"2016-09-19T17:19:50Z","html_url":"https://github.com/pymedusa/SickRage/pull/779#discussion_r79442097","pull_request_url":"https://api.github.com/repos/pymedusa/SickRage/pulls/779","_links":{"self":{"href":"https://api.github.com/repos/pymedusa/SickRage/pulls/comments/79442097"},"html":{"href":"https://github.com/pymedusa/SickRage/pull/779#discussion_r79442097"},"pull_request":{"href":"https://api.github.com/repos/pymedusa/SickRage/pulls/779"}}},"pull_request":{"url":"https://api.github.com/repos/pymedusa/SickRage/pulls/779","id":77731156,"html_url":"https://github.com/pymedusa/SickRage/pull/779","diff_url":"https://github.com/pymedusa/SickRage/pull/779.diff","patch_url":"https://github.com/pymedusa/SickRage/pull/779.patch","issue_url":"https://api.github.com/repos/pymedusa/SickRage/issues/779","number":779,"state":"open","locked":false,"title":"Replace legacy tvdb_api with tvdb api v2","user":{"login":"p0psicles","id":1331394,"avatar_url":"https://avatars.githubusercontent.com/u/1331394?v=3","gravatar_id":"","url":"https://api.github.com/users/p0psicles","html_url":"https://github.com/p0psicles","followers_url":"https://api.github.com/users/p0psicles/followers","following_url":"https://api.github.com/users/p0psicles/following{/other_user}","gists_url":"https://api.github.com/users/p0psicles/gists{/gist_id}","starred_url":"https://api.github.com/users/p0psicles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p0psicles/subscriptions","organizations_url":"https://api.github.com/users/p0psicles/orgs","repos_url":"https://api.github.com/users/p0psicles/repos","events_url":"https://api.github.com/users/p0psicles/events{/privacy}","received_events_url":"https://api.github.com/users/p0psicles/received_events","type":"User","site_admin":false},"body":"### The goals of this PR are:\r\n1. Restructure the indexer code, creating a more modular setup, where it's less work to add new indexers compared to how it is currently setup.\r\n\r\n2. Replace the 'legacy' thetvdb indexer code with the api v2. https://api.thetvdb.com/swagger.\r\n\r\nA followup will be adding the tvmaze indexer. As is waiting in #145 \r\n\r\n### To accomplish this the following has to be done:\r\n- [ ] Make sure the swagger client has all the features as the legacy client.\r\n- [ ] Separate the indexer code into a lib part and medusa indexer code. Currently they're tangled.\r\n- [ ] Add the v2 code as a new indexer next to the legacy indexer. The legacy indexer code will be replaced. But for testing purposses, they should work fine next to each other. The ID used will be '4' for now, as 3 has been reserved by tvmaze and '2' is used by tvrage.\r\n- [ ] When tested, remove the legacy indexer code, and make sure everything works fine, including the scene names / season scene names / scene episode mappings.\r\n\r\n### Log:\r\nThis is a list to document what needs to be taken care of when implementing a new indexer. I'll update this as I move along.\r\n\r\n- [x] Show search by name\r\n- [ ] Show search by id, indexing the show attributes, seasons, episodes, banner, etc. `Is working, except for the banner.`\r\n- [x] Episode summaries\r\n- [ ] Add metadata creation\r\n- [ ] Add banner and poster support if available\r\n- [ ] Add timezone and network information\r\n- [ ] Add actors information (do not know why, but old indexer also had it)\r\n- [ ] Add indexer mappings (when indexer providers indexer ids to other indexers)\r\n- [ ] Add the indexer icon\r\n- [ ] Lot's of cleanup of the tvdbv2 indexer files (pep8, snake_case, unicode_literals)\r\n- [ ] Remove all references to tvdb legacy indexer. The api, might also be called directly.\r\n- [ ] Add new unit tests\r\n\r\n### Tvdb Apiv2 Lib related\r\n- [x] Make sure the api returns unicode. Test by searching: 'guide to pretty'. Currently i've adjusted the mapping for the Series modal. Need to also check for others, like episode, actors, etc.\r\n- [ ] Add searching with apostophes '.\r\n- [ ] Maybe replace urllib3 with requests. But the way it has been setup, that might not be that easy.\r\n\r\n### Screenies\r\nv2 api is already giving more results back than the old one.\r\n![image](https://cloud.githubusercontent.com/assets/1331394/16921973/0a5a7a78-4d14-11e6-844c-1dfc9c615c98.png)\r\n\r\nv1:\r\n![image](https://cloud.githubusercontent.com/assets/1331394/16921981/1aba9bb4-4d14-11e6-9486-90b355a8c9c5.png)\r\n","created_at":"2016-07-17T09:36:55Z","updated_at":"2016-09-19T17:19:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4f0ab0bfa805bdc13ec42e1f67cc23b13dade40","assignee":{"login":"p0psicles","id":1331394,"avatar_url":"https://avatars.githubusercontent.com/u/1331394?v=3","gravatar_id":"","url":"https://api.github.com/users/p0psicles","html_url":"https://github.com/p0psicles","followers_url":"https://api.github.com/users/p0psicles/followers","following_url":"https://api.github.com/users/p0psicles/following{/other_user}","gists_url":"https://api.github.com/users/p0psicles/gists{/gist_id}","starred_url":"https://api.github.com/users/p0psicles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p0psicles/subscriptions","organizations_url":"https://api.github.com/users/p0psicles/orgs","repos_url":"https://api.github.com/users/p0psicles/repos","events_url":"https://api.github.com/users/p0psicles/events{/privacy}","received_events_url":"https://api.github.com/users/p0psicles/received_events","type":"User","site_admin":false},"assignees":[{"login":"p0psicles","id":1331394,"avatar_url":"https://avatars.githubusercontent.com/u/1331394?v=3","gravatar_id":"","url":"https://api.github.com/users/p0psicles","html_url":"https://github.com/p0psicles","followers_url":"https://api.github.com/users/p0psicles/followers","following_url":"https://api.github.com/users/p0psicles/following{/other_user}","gists_url":"https://api.github.com/users/p0psicles/gists{/gist_id}","starred_url":"https://api.github.com/users/p0psicles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p0psicles/subscriptions","organizations_url":"https://api.github.com/users/p0psicles/orgs","repos_url":"https://api.github.com/users/p0psicles/repos","events_url":"https://api.github.com/users/p0psicles/events{/privacy}","received_events_url":"https://api.github.com/users/p0psicles/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/pymedusa/SickRage/pulls/779/commits","review_comments_url":"https://api.github.com/repos/pymedusa/SickRage/pulls/779/comments","review_comment_url":"https://api.github.com/repos/pymedusa/SickRage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pymedusa/SickRage/issues/779/comments","statuses_url":"https://api.github.com/repos/pymedusa/SickRage/statuses/9e3644ddaedd4a72ed12bcadc668b37c22588210","head":{"label":"pymedusa:tvdbapiv2","ref":"tvdbapiv2","sha":"9e3644ddaedd4a72ed12bcadc668b37c22588210","user":{"login":"pymedusa","id":16712498,"avatar_url":"https://avatars.githubusercontent.com/u/16712498?v=3","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":"SickRage","full_name":"pymedusa/SickRage","owner":{"login":"pymedusa","id":16712498,"avatar_url":"https://avatars.githubusercontent.com/u/16712498?v=3","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/SickRage","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/SickRage","forks_url":"https://api.github.com/repos/pymedusa/SickRage/forks","keys_url":"https://api.github.com/repos/pymedusa/SickRage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pymedusa/SickRage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pymedusa/SickRage/teams","hooks_url":"https://api.github.com/repos/pymedusa/SickRage/hooks","issue_events_url":"https://api.github.com/repos/pymedusa/SickRage/issues/events{/number}","events_url":"https://api.github.com/repos/pymedusa/SickRage/events","assignees_url":"https://api.github.com/repos/pymedusa/SickRage/assignees{/user}","branches_url":"https://api.github.com/repos/pymedusa/SickRage/branches{/branch}","tags_url":"https://api.github.com/repos/pymedusa/SickRage/tags","blobs_url":"https://api.github.com/repos/pymedusa/SickRage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pymedusa/SickRage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pymedusa/SickRage/git/refs{/sha}","trees_url":"https://api.github.com/repos/pymedusa/SickRage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pymedusa/SickRage/statuses/{sha}","languages_url":"https://api.github.com/repos/pymedusa/SickRage/languages","stargazers_url":"https://api.github.com/repos/pymedusa/SickRage/stargazers","contributors_url":"https://api.github.com/repos/pymedusa/SickRage/contributors","subscribers_url":"https://api.github.com/repos/pymedusa/SickRage/subscribers","subscription_url":"https://api.github.com/repos/pymedusa/SickRage/subscription","commits_url":"https://api.github.com/repos/pymedusa/SickRage/commits{/sha}","git_commits_url":"https://api.github.com/repos/pymedusa/SickRage/git/commits{/sha}","comments_url":"https://api.github.com/repos/pymedusa/SickRage/comments{/number}","issue_comment_url":"https://api.github.com/repos/pymedusa/SickRage/issues/comments{/number}","contents_url":"https://api.github.com/repos/pymedusa/SickRage/contents/{+path}","compare_url":"https://api.github.com/repos/pymedusa/SickRage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pymedusa/SickRage/merges","archive_url":"https://api.github.com/repos/pymedusa/SickRage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pymedusa/SickRage/downloads","issues_url":"https://api.github.com/repos/pymedusa/SickRage/issues{/number}","pulls_url":"https://api.github.com/repos/pymedusa/SickRage/pulls{/number}","milestones_url":"https://api.github.com/repos/pymedusa/SickRage/milestones{/number}","notifications_url":"https://api.github.com/repos/pymedusa/SickRage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pymedusa/SickRage/labels{/name}","releases_url":"https://api.github.com/repos/pymedusa/SickRage/releases{/id}","deployments_url":"https://api.github.com/repos/pymedusa/SickRage/deployments","created_at":"2016-02-23T06:02:11Z","updated_at":"2016-09-15T08:01:26Z","pushed_at":"2016-09-19T17:15:26Z","git_url":"git://github.com/pymedusa/SickRage.git","ssh_url":"git@github.com:pymedusa/SickRage.git","clone_url":"https://github.com/pymedusa/SickRage.git","svn_url":"https://github.com/pymedusa/SickRage","homepage":"","size":59442,"stargazers_count":24,"watchers_count":24,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":65,"forks":12,"open_issues":65,"watchers":24,"default_branch":"master"}},"base":{"label":"pymedusa:develop","ref":"develop","sha":"13c1d557d11db5c035fb213175fb7886d4fb5818","user":{"login":"pymedusa","id":16712498,"avatar_url":"https://avatars.githubusercontent.com/u/16712498?v=3","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":"SickRage","full_name":"pymedusa/SickRage","owner":{"login":"pymedusa","id":16712498,"avatar_url":"https://avatars.githubusercontent.com/u/16712498?v=3","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/SickRage","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/SickRage","forks_url":"https://api.github.com/repos/pymedusa/SickRage/forks","keys_url":"https://api.github.com/repos/pymedusa/SickRage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pymedusa/SickRage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pymedusa/SickRage/teams","hooks_url":"https://api.github.com/repos/pymedusa/SickRage/hooks","issue_events_url":"https://api.github.com/repos/pymedusa/SickRage/issues/events{/number}","events_url":"https://api.github.com/repos/pymedusa/SickRage/events","assignees_url":"https://api.github.com/repos/pymedusa/SickRage/assignees{/user}","branches_url":"https://api.github.com/repos/pymedusa/SickRage/branches{/branch}","tags_url":"https://api.github.com/repos/pymedusa/SickRage/tags","blobs_url":"https://api.github.com/repos/pymedusa/SickRage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pymedusa/SickRage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pymedusa/SickRage/git/refs{/sha}","trees_url":"https://api.github.com/repos/pymedusa/SickRage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pymedusa/SickRage/statuses/{sha}","languages_url":"https://api.github.com/repos/pymedusa/SickRage/languages","stargazers_url":"https://api.github.com/repos/pymedusa/SickRage/stargazers","contributors_url":"https://api.github.com/repos/pymedusa/SickRage/contributors","subscribers_url":"https://api.github.com/repos/pymedusa/SickRage/subscribers","subscription_url":"https://api.github.com/repos/pymedusa/SickRage/subscription","commits_url":"https://api.github.com/repos/pymedusa/SickRage/commits{/sha}","git_commits_url":"https://api.github.com/repos/pymedusa/SickRage/git/commits{/sha}","comments_url":"https://api.github.com/repos/pymedusa/SickRage/comments{/number}","issue_comment_url":"https://api.github.com/repos/pymedusa/SickRage/issues/comments{/number}","contents_url":"https://api.github.com/repos/pymedusa/SickRage/contents/{+path}","compare_url":"https://api.github.com/repos/pymedusa/SickRage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pymedusa/SickRage/merges","archive_url":"https://api.github.com/repos/pymedusa/SickRage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pymedusa/SickRage/downloads","issues_url":"https://api.github.com/repos/pymedusa/SickRage/issues{/number}","pulls_url":"https://api.github.com/repos/pymedusa/SickRage/pulls{/number}","milestones_url":"https://api.github.com/repos/pymedusa/SickRage/milestones{/number}","notifications_url":"https://api.github.com/repos/pymedusa/SickRage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pymedusa/SickRage/labels{/name}","releases_url":"https://api.github.com/repos/pymedusa/SickRage/releases{/id}","deployments_url":"https://api.github.com/repos/pymedusa/SickRage/deployments","created_at":"2016-02-23T06:02:11Z","updated_at":"2016-09-15T08:01:26Z","pushed_at":"2016-09-19T17:15:26Z","git_url":"git://github.com/pymedusa/SickRage.git","ssh_url":"git@github.com:pymedusa/SickRage.git","clone_url":"https://github.com/pymedusa/SickRage.git","svn_url":"https://github.com/pymedusa/SickRage","homepage":"","size":59442,"stargazers_count":24,"watchers_count":24,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":65,"forks":12,"open_issues":65,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pymedusa/SickRage/pulls/779"},"html":{"href":"https://github.com/pymedusa/SickRage/pull/779"},"issue":{"href":"https://api.github.com/repos/pymedusa/SickRage/issues/779"},"comments":{"href":"https://api.github.com/repos/pymedusa/SickRage/issues/779/comments"},"review_comments":{"href":"https://api.github.com/repos/pymedusa/SickRage/pulls/779/comments"},"review_comment":{"href":"https://api.github.com/repos/pymedusa/SickRage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pymedusa/SickRage/pulls/779/commits"},"statuses":{"href":"https://api.github.com/repos/pymedusa/SickRage/statuses/9e3644ddaedd4a72ed12bcadc668b37c22588210"}}}}
{"actor":{"display_login":"codacy-bot"}}