mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 00:43:37 +00:00
Fix for air dates in TVRage API code
This commit is contained in:
parent
f3c33279b5
commit
108df09382
1 changed files with 1 additions and 1 deletions
|
@ -395,7 +395,7 @@ class TVRage:
|
||||||
|
|
||||||
if elm.tag in 'firstaired':
|
if elm.tag in 'firstaired':
|
||||||
try:
|
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)
|
elm.text = re.sub("([-]0{2}){1,}", "", elm.text)
|
||||||
fixDate = parse(elm.text, fuzzy=True).date()
|
fixDate = parse(elm.text, fuzzy=True).date()
|
||||||
elm.text = fixDate.strftime("%Y-%m-%d")
|
elm.text = fixDate.strftime("%Y-%m-%d")
|
||||||
|
|
Loading…
Reference in a new issue