From 37d93557fb2d67407af0c45bc567c4d98c6d35d3 Mon Sep 17 00:00:00 2001 From: crobibero Date: Sun, 26 Jul 2020 11:59:31 -0600 Subject: [PATCH] Make StartDate nullable --- Jellyfin.Plugin.Anime/Providers/KitsuIO/ApiClient/ApiModel.cs | 2 +- .../Providers/KitsuIO/Metadata/KitsuIoSeriesProvider.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Jellyfin.Plugin.Anime/Providers/KitsuIO/ApiClient/ApiModel.cs b/Jellyfin.Plugin.Anime/Providers/KitsuIO/ApiClient/ApiModel.cs index 60bb676..19604b8 100644 --- a/Jellyfin.Plugin.Anime/Providers/KitsuIO/ApiClient/ApiModel.cs +++ b/Jellyfin.Plugin.Anime/Providers/KitsuIO/ApiClient/ApiModel.cs @@ -27,7 +27,7 @@ namespace Jellyfin.Plugin.Anime.Providers.KitsuIO.ApiClient public string Synopsis { get; set; } public Titles Titles { get; set; } public string AverageRating { get; set; } - public DateTimeOffset StartDate { get; set; } + public DateTimeOffset? StartDate { get; set; } public PosterImage PosterImage { get; set; } // Episode specific diff --git a/Jellyfin.Plugin.Anime/Providers/KitsuIO/Metadata/KitsuIoSeriesProvider.cs b/Jellyfin.Plugin.Anime/Providers/KitsuIO/Metadata/KitsuIoSeriesProvider.cs index 22fa75a..a2f9967 100644 --- a/Jellyfin.Plugin.Anime/Providers/KitsuIO/Metadata/KitsuIoSeriesProvider.cs +++ b/Jellyfin.Plugin.Anime/Providers/KitsuIO/Metadata/KitsuIoSeriesProvider.cs @@ -44,8 +44,8 @@ namespace Jellyfin.Plugin.Anime.Providers.KitsuIO.Metadata SearchProviderName = Name, ImageUrl = series.Attributes.PosterImage.Medium.ToString(), Overview = series.Attributes.Synopsis, - ProductionYear = series.Attributes.StartDate.Year, - PremiereDate = series.Attributes.StartDate.DateTime, + ProductionYear = series.Attributes.StartDate?.Year, + PremiereDate = series.Attributes.StartDate?.DateTime, }; parsedSeries.SetProviderId(ProviderNames.KitsuIo, series.Id.ToString()); results.Add(parsedSeries);