We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2eb233a + 1b78050 commit e62da4aCopy full SHA for e62da4a
1 file changed
plugins/tvdb.py
@@ -40,10 +40,16 @@ def get_episodes_for_series(series_name, api_key):
40
return res
41
42
series = etree.fromstring(_request.content, parser=parser)
43
- series_name = series.xpath('//SeriesName/text()')[0]
44
-
45
- if series.xpath('//Status/text()')[0] == 'Ended':
46
- res["ended"] = True
+ try:
+ series_name = series.xpath('//SeriesName/text()')[0]
+ except:
+ series_name = series.xpath('//SeriesName/text()')
47
48
+ if series.xpath('//Status/text()')[0] == 'Ended':
49
+ res["ended"] = True
50
51
+ if series.xpath('//Status/text()') == 'Ended':
52
53
54
res["episodes"] = series.xpath('//Episode')
55
res["name"] = series_name
0 commit comments