Commit 4cb9f3bc authored by echel0n's avatar echel0n

Added version pinning for TheTVDB API, current is v3.0.0

parent 69d8117c
......@@ -300,6 +300,7 @@ class Tvdb:
def __init__(self):
self.config = {
'api': {
'version': '3.0.0',
'lang': 'en',
'base': "https://api.thetvdb.com",
'login': '/login',
......@@ -433,6 +434,7 @@ class Tvdb:
self.config['headers'].update({'Content-type': 'application/json'})
self.config['headers']['Authorization'] = 'Bearer {}'.format(self.jwt_token)
self.config['headers'].update({'Accept-Language': lang or self.config['language']})
self.config['headers'].update({'Accept': 'application/vnd.thetvdb.v{}'.format(self.config['api']['version'])})
for i in range(0, retries):
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment