fancy tv series title

This commit is contained in:
j 2007-08-10 10:31:42 +00:00
parent 96829cb906
commit 92f5ae3f7d

View file

@ -188,6 +188,13 @@ class IMDb:
title = title[1:-1]
elif title.startswith('"') and title.find('"',1) > 0 and \
title.find('"',1) == title.rfind('"'):
se = re.compile("Season (\d*), Episode (\d*)\)").findall(data)
if se:
se = se[0]
print se
se = ' (S%02dE%02d)' % (int(se[0]), int(se[1]))
title = title[1:title.rfind('"')] + se + title[title.rfind('"')+1:]
else:
title = title[1:title.rfind('"')] + ':' + title[title.rfind('"')+1:]
return title