mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-20 16:43:43 +00:00
Fix for firstaired dates as they are inconsistant in format on TVRage
This commit is contained in:
parent
f6e3ee1ef2
commit
33cf136487
1 changed files with 7 additions and 2 deletions
|
@ -576,8 +576,13 @@ class TVRage:
|
|||
tag = curInfo.tag.lower()
|
||||
|
||||
if curInfo.tag.lower() in ('started', 'ended') and curInfo.text is not None:
|
||||
fixDate = dt.datetime.strptime(curInfo.text,"%b/%d/%Y")
|
||||
value = fixDate.strftime("%Y-%m-%d")
|
||||
try:
|
||||
fixDate = dt.datetime.strptime(curInfo.text,"%b/%Y")
|
||||
newDate = fixDate.replace(day=01)
|
||||
value = newDate.strftime("%Y-%m-%d")
|
||||
except Exception:
|
||||
fixDate = dt.datetime.strptime(curInfo.text,"%b/%d/%Y")
|
||||
value = fixDate.strftime("%Y-%m-%d")
|
||||
else:
|
||||
value = curInfo.text
|
||||
|
||||
|
|
Loading…
Reference in a new issue