Skip to content

Commit

Permalink
Forgot a bit with airdate.
Browse files Browse the repository at this point in the history
Cazzar committed May 15, 2019
1 parent c1fb229 commit 7187396
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
@@ -198,8 +198,10 @@ def Update(self, metadata, media, lang, force, movie):
episodeObj.summary = summary_sanitizer(ep['summary'])
Log("" + str(ep['epnumber']) + ": " + ep['summary'])

if ep['air'] != '1/01/0001 12:00:00 AM' and ep['air'] != '0001-01-01':
episodeObj.originally_available_at = datetime.strptime(ep['air'], "%Y-%m-%d").date()
airdate = try_get(ep, 'air', '1/01/0001 12:00:00 AM')

if airdate != '1/01/0001 12:00:00 AM' and airdate != '0001-01-01':
episodeObj.originally_available_at = datetime.strptime(airdate, "%Y-%m-%d").date()

if len(ep['art']['thumb']) and Prefs['customThumbs']:
self.metadata_add(episodeObj.thumbs, ep['art']['thumb'])

0 comments on commit 7187396

Please sign in to comment.