Fix syncing when Premiere date is empty

This commit is contained in:
Odd Stråbø 2022-10-29 16:49:16 +02:00
parent d67affc459
commit c1f79000c7
2 changed files with 3 additions and 2 deletions

View file

@ -94,7 +94,8 @@ class Movies(KodiDb):
obj['Video'] = API.video_streams(obj['Video'] or [], obj['Container']) obj['Video'] = API.video_streams(obj['Video'] or [], obj['Container'])
obj['Audio'] = API.audio_streams(obj['Audio'] or []) obj['Audio'] = API.audio_streams(obj['Audio'] or [])
obj['Streams'] = API.media_streams(obj['Video'], obj['Audio'], obj['Subtitles']) obj['Streams'] = API.media_streams(obj['Video'], obj['Audio'], obj['Subtitles'])
obj['Premiere'] = Local(obj['Premiere']).split('.')[0].replace('T', " ") or obj['Year'] if obj['Premiere'] is not None:
obj['Premiere'] = obj['Premiere'].split('T')[0]
self.get_path_filename(obj) self.get_path_filename(obj)
self.trailer(obj) self.trailer(obj)

View file

@ -13,7 +13,7 @@
"UniqueId": "ProviderIds/Imdb", "UniqueId": "ProviderIds/Imdb",
"Rating": "CommunityRating", "Rating": "CommunityRating",
"Year": "ProductionYear", "Year": "ProductionYear",
"Premiere": "PremiereDate", "Premiere": "PremiereDate,ProductionYear",
"Votes": "VoteCount", "Votes": "VoteCount",
"Plot": "Overview", "Plot": "Overview",
"ShortPlot": "ShortOverview", "ShortPlot": "ShortOverview",