Skip to content

Commit ec1a35a

Browse files
committed
Update to 1.0.6
1 parent 415a548 commit ec1a35a

File tree

8 files changed

+17
-18
lines changed

8 files changed

+17
-18
lines changed

addon.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<addon id="script.module.tvdbsimple" name="tvdbsimple" version="1.0.4" provider-name="phate89">
2+
<addon id="script.module.tvdbsimple" name="tvdbsimple" version="1.0.6" provider-name="phate89">
33
<requires>
44
<import addon="xbmc.python" version="3.0.0"/>
55
<import addon="script.module.requests" version="2.9.1"/>

lib/tvdbsimple/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"""
5050

5151
__title__ = 'tvdbsimple'
52-
__version__ = '1.0.4'
52+
__version__ = '1.0.6'
5353
__author__ = 'phate89'
5454
__copyright__ = 'Copyright © 2017 phate89'
5555
__license__ = 'GPLv3'

lib/tvdbsimple/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def get_token(self, forceNew=False):
116116
else:
117117
error = "Unknown error while authenticating. Check your api key or your user/userkey"
118118
try:
119-
error = response.json()['error']
119+
error = response.json()['Error']
120120
except:
121121
pass
122122
raise AuthenticationError(error)
@@ -141,7 +141,7 @@ def _request(self, method, path, params=None, payload=None, forceNewToken=False,
141141
elif not forceNewToken:
142142
return self._request(method=method, path=path, params=params, payload=payload, forceNewToken=True)
143143
try:
144-
raise Exception(response.json()['error'])
144+
raise Exception(response.json()['Error'])
145145
except:
146146
response.raise_for_status()
147147

lib/tvdbsimple/languages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def all(self):
4141
4242
"""
4343
if self._ALL_PARSED:
44-
return list(self.LANGUAGES.values())
44+
return self.LANGUAGES.values()
4545

4646
path = self._get_path('all')
4747

lib/tvdbsimple/search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Search(TVDB):
1616
_BASE_PATH = 'search'
1717
_URLS = {
1818
'series': '/series',
19-
'seriesparams': '/series/params'
19+
'series_params': '/series/params'
2020
}
2121

2222
def series(self, name='', imdbId='', zap2itId='', language=''):

lib/tvdbsimple/series.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,8 @@ class Series_Episodes(TVDB):
104104
'summary': '/{id}/episodes/summary',
105105
'episodes': '/{id}/episodes',
106106
'query': '/{id}/episodes/query',
107-
'queryparams': '/{id}/episodes/query/params'
107+
'query_params': '/{id}/episodes/query/params'
108108
}
109-
_PAGES = -1
110-
_PAGES_LIST = {}
111-
_FILTERS = {}
112109

113110
def __init__(self, id, language='', **kwargs):
114111
"""
@@ -132,7 +129,10 @@ def __init__(self, id, language='', **kwargs):
132129
"""
133130
super(Series_Episodes, self).__init__(id)
134131
self._set_language(language)
132+
self._FILTERS = {}
135133
self.update_filters(**kwargs)
134+
self._PAGES = -1
135+
self._PAGES_LIST = {}
136136

137137
def update_filters(self, **kwargs):
138138
"""
@@ -151,6 +151,8 @@ def update_filters(self, **kwargs):
151151
You can provide `imdbId` to get only episodes with the
152152
provided imdb id.
153153
"""
154+
self._PAGES = -1
155+
self._PAGES_LIST = {}
154156
self._FILTERS=kwargs
155157

156158
def summary(self):
@@ -264,9 +266,8 @@ class Series_Images(TVDB):
264266
_URLS = {
265267
'imagequery': '/{id}/images/query',
266268
'summary': '/{id}/images',
267-
'queryparams': '/{id}/images/query/params'
269+
'query_params': '/{id}/images/query/params'
268270
}
269-
_FILTERS = {}
270271

271272
def __init__(self, id, language='', **kwargs):
272273
"""

lib/tvdbsimple/updates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ class Updates(TVDB):
1717
_BASE_PATH = 'updated'
1818
_URLS = {
1919
'query': '/query',
20-
'params': '/query/params'
20+
'update_params': '/query/params'
2121
}
22-
_FILTERS = {}
2322

2423
def __init__(self, fromTime, toTime='', language=''):
2524
"""
@@ -30,6 +29,7 @@ def __init__(self, fromTime, toTime='', language=''):
3029
You can also set `language` with a language id to get the result
3130
in the specific language.
3231
"""
32+
self._FILTERS = {}
3333
self.update_filters(fromTime, toTime, language)
3434

3535
def update_filters(self, fromTime='', toTime='', language=''):

lib/tvdbsimple/user.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,6 @@ class User_Ratings(TVDB):
147147
'add': '/{itemType}/{itemId}/{itemRating}',
148148
'delete': '/{itemType}/{itemId}'
149149
}
150-
_PAGES = -1
151-
_PAGES_LIST = {}
152-
_FILTERS = {}
153150

154151
def __init__(self, user, key, **kwargs):
155152
"""
@@ -162,7 +159,6 @@ def __init__(self, user, key, **kwargs):
162159
Can be either 'series', 'episode', or 'banner'.
163160
"""
164161
super(User_Ratings, self).__init__(user=user, key=key)
165-
self._FILTERS = {}
166162
self.update_filters(**kwargs)
167163

168164
def update_filters(self, **kwargs):
@@ -172,6 +168,8 @@ def update_filters(self, **kwargs):
172168
It's possible to provide `itemType` that filters ratings by type.
173169
Can be either 'series', 'episode', or 'banner'.
174170
"""
171+
self._PAGES = -1
172+
self._PAGES_LIST = {}
175173
self._FILTERS = kwargs
176174

177175
def query_params(self):

0 commit comments

Comments
 (0)