mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 00:43:37 +00:00
Adding shows via TVRage fixed!
This commit is contained in:
parent
d30060bf91
commit
5eabe43e48
1 changed files with 8 additions and 5 deletions
|
@ -443,7 +443,6 @@ class TVRage:
|
||||||
if not isinstance(value, list):
|
if not isinstance(value, list):
|
||||||
value = [value]
|
value = [value]
|
||||||
value = '|' + '|'.join(value) + '|'
|
value = '|' + '|'.join(value) + '|'
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if key == 'firstaired' and value in "0000-00-00":
|
if key == 'firstaired' and value in "0000-00-00":
|
||||||
new_value = str(dt.date.fromordinal(1))
|
new_value = str(dt.date.fromordinal(1))
|
||||||
|
@ -513,6 +512,8 @@ class TVRage:
|
||||||
"""
|
"""
|
||||||
if sid not in self.shows:
|
if sid not in self.shows:
|
||||||
self.shows[sid] = Show()
|
self.shows[sid] = Show()
|
||||||
|
|
||||||
|
if not isinstance(key, dict or list) and not isinstance(value, dict or list):
|
||||||
self.shows[sid].data[key] = value
|
self.shows[sid].data[key] = value
|
||||||
|
|
||||||
def _cleanData(self, data):
|
def _cleanData(self, data):
|
||||||
|
@ -522,6 +523,8 @@ class TVRage:
|
||||||
- Replaces & with &
|
- Replaces & with &
|
||||||
- Trailing whitespace
|
- Trailing whitespace
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if not isinstance(data, dict or list):
|
||||||
data = data.replace(u"&", u"&")
|
data = data.replace(u"&", u"&")
|
||||||
data = data.strip()
|
data = data.strip()
|
||||||
return data
|
return data
|
||||||
|
@ -594,7 +597,7 @@ class TVRage:
|
||||||
self.config['params_epInfo']['sid'] = sid
|
self.config['params_epInfo']['sid'] = sid
|
||||||
epsEt = self._getetsrc(self.config['url_epInfo'], self.config['params_epInfo'])
|
epsEt = self._getetsrc(self.config['url_epInfo'], self.config['params_epInfo'])
|
||||||
|
|
||||||
for season in epsEt['Episodelist']['Season']:
|
for season in epsEt['episodelist']['season']:
|
||||||
episodes = season['episode']
|
episodes = season['episode']
|
||||||
if not isinstance(episodes, list):
|
if not isinstance(episodes, list):
|
||||||
episodes = [episodes]
|
episodes = [episodes]
|
||||||
|
|
Loading…
Reference in a new issue