Adding shows via TVRage fixed!

This commit is contained in:
echel0n 2014-06-05 12:17:49 -07:00
parent d30060bf91
commit 5eabe43e48

View file

@ -443,7 +443,6 @@ class TVRage:
if not isinstance(value, list):
value = [value]
value = '|' + '|'.join(value) + '|'
try:
if key == 'firstaired' and value in "0000-00-00":
new_value = str(dt.date.fromordinal(1))
@ -513,6 +512,8 @@ class TVRage:
"""
if sid not in self.shows:
self.shows[sid] = Show()
if not isinstance(key, dict or list) and not isinstance(value, dict or list):
self.shows[sid].data[key] = value
def _cleanData(self, data):
@ -522,6 +523,8 @@ class TVRage:
- Replaces & with &
- Trailing whitespace
"""
if not isinstance(data, dict or list):
data = data.replace(u"&", u"&")
data = data.strip()
return data
@ -594,7 +597,7 @@ class TVRage:
self.config['params_epInfo']['sid'] = sid
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']
if not isinstance(episodes, list):
episodes = [episodes]