mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 21:53:37 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
c258a0ea29
2 changed files with 26 additions and 3 deletions
|
@ -29,6 +29,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 0.16.22 (2018-08-18 12:30:00 UTC)
|
||||||
|
|
||||||
|
* Change TVDB data parsing for gueststars, writers and genre
|
||||||
|
|
||||||
|
|
||||||
### 0.16.21 (2018-07-28 14:15:00 UTC)
|
### 0.16.21 (2018-07-28 14:15:00 UTC)
|
||||||
|
|
||||||
* Change TorrentDay
|
* Change TorrentDay
|
||||||
|
|
|
@ -610,9 +610,13 @@ class Tvdb:
|
||||||
except (StandardError, Exception):
|
except (StandardError, Exception):
|
||||||
raise tvdb_error
|
raise tvdb_error
|
||||||
|
|
||||||
map_show = {'airstime': 'airs_time', 'airsdayofweek': 'airs_dayofweek', 'imdbid': 'imdb_id'}
|
map_show = {'airstime': 'airs_time', 'airsdayofweek': 'airs_dayofweek', 'imdbid': 'imdb_id',
|
||||||
|
'writers': 'writer'}
|
||||||
|
|
||||||
def map_show_keys(data):
|
def map_show_keys(data):
|
||||||
|
keep_data = {}
|
||||||
|
del_keys = []
|
||||||
|
new_data = {}
|
||||||
for k, v in data.iteritems():
|
for k, v in data.iteritems():
|
||||||
k_org = k
|
k_org = k
|
||||||
k = k.lower()
|
k = k.lower()
|
||||||
|
@ -620,6 +624,13 @@ class Tvdb:
|
||||||
if k in ['banner', 'fanart', 'poster'] and v:
|
if k in ['banner', 'fanart', 'poster'] and v:
|
||||||
v = self.config['url_artworkPrefix'] % v
|
v = self.config['url_artworkPrefix'] % v
|
||||||
elif 'genre' == k:
|
elif 'genre' == k:
|
||||||
|
keep_data['genre_list'] = v
|
||||||
|
v = '|%s|' % '|'.join([self._clean_data(c) for c in v if isinstance(c, basestring)])
|
||||||
|
elif 'gueststars' == k:
|
||||||
|
keep_data['gueststars_list'] = v
|
||||||
|
v = '|%s|' % '|'.join([self._clean_data(c) for c in v if isinstance(c, basestring)])
|
||||||
|
elif 'writers' == k:
|
||||||
|
keep_data[k] = v
|
||||||
v = '|%s|' % '|'.join([self._clean_data(c) for c in v if isinstance(c, basestring)])
|
v = '|%s|' % '|'.join([self._clean_data(c) for c in v if isinstance(c, basestring)])
|
||||||
elif 'firstaired' == k:
|
elif 'firstaired' == k:
|
||||||
if v:
|
if v:
|
||||||
|
@ -634,8 +645,15 @@ class Tvdb:
|
||||||
if k in map_show:
|
if k in map_show:
|
||||||
k = map_show[k]
|
k = map_show[k]
|
||||||
if k_org is not k:
|
if k_org is not k:
|
||||||
del(data[k_org])
|
del_keys.append(k_org)
|
||||||
|
new_data[k] = v
|
||||||
|
else:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
for d in del_keys:
|
||||||
|
del(data[d])
|
||||||
|
if isinstance(data, dict):
|
||||||
|
data.update(new_data)
|
||||||
|
data.update(keep_data)
|
||||||
return data
|
return data
|
||||||
|
|
||||||
if resp:
|
if resp:
|
||||||
|
|
Loading…
Reference in a new issue