Fix for air dates in TVRage API code

This commit is contained in:
echel0n 2014-03-21 10:26:22 -07:00
parent f3c33279b5
commit 108df09382
1 changed files with 1 additions and 1 deletions

View File

@ -395,7 +395,7 @@ class TVRage:
if elm.tag in 'firstaired':
try:
elm.text = re.sub("(0{4})([-]0{2}){1,}", str(dt.date.fromordinal(1)), elm.text)
if elm.text is "0000-00-00": elm.text = str(dt.date.fromordinal(1))
elm.text = re.sub("([-]0{2}){1,}", "", elm.text)
fixDate = parse(elm.text, fuzzy=True).date()
elm.text = fixDate.strftime("%Y-%m-%d")