1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

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,7 +512,9 @@ class TVRage:
"""
if sid not in self.shows:
self.shows[sid] = Show()
self.shows[sid].data[key] = value
if not isinstance(key, dict or list) and not isinstance(value, dict or list):
self.shows[sid].data[key] = value
def _cleanData(self, data):
"""Cleans up strings returned by tvrage.com
@ -522,8 +523,10 @@ class TVRage:
- Replaces & with &
- Trailing whitespace
"""
data = data.replace(u"&", u"&")
data = data.strip()
if not isinstance(data, dict or list):
data = data.replace(u"&", u"&")
data = data.strip()
return data
def search(self, series):
@ -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]