From 2b4808fa3f5a5c45848c178ef30d315ee336994d Mon Sep 17 00:00:00 2001 From: iceypotato Date: Mon, 24 Jul 2023 12:14:23 -0700 Subject: [PATCH] Fixed issue 5839 Added enum entries in simkl API, as well as tweaked the import warning message. --- src/NzbDrone.Core/ImportLists/Simkl/SimklAPI.cs | 9 ++++++++- src/NzbDrone.Core/ImportLists/Simkl/SimklParser.cs | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/ImportLists/Simkl/SimklAPI.cs b/src/NzbDrone.Core/ImportLists/Simkl/SimklAPI.cs index 0290dabfb..a35df76a8 100644 --- a/src/NzbDrone.Core/ImportLists/Simkl/SimklAPI.cs +++ b/src/NzbDrone.Core/ImportLists/Simkl/SimklAPI.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Runtime.Serialization; using Newtonsoft.Json; namespace NzbDrone.Core.ImportLists.Simkl @@ -75,6 +76,12 @@ namespace NzbDrone.Core.ImportLists.Simkl public enum SimklAnimeType { Tv, - Movie + Movie, + Ova, + Ona, + Special, + + [EnumMember(Value = "music video")] + Music } } diff --git a/src/NzbDrone.Core/ImportLists/Simkl/SimklParser.cs b/src/NzbDrone.Core/ImportLists/Simkl/SimklParser.cs index 1419c6be7..32d3df2d4 100644 --- a/src/NzbDrone.Core/ImportLists/Simkl/SimklParser.cs +++ b/src/NzbDrone.Core/ImportLists/Simkl/SimklParser.cs @@ -43,7 +43,7 @@ namespace NzbDrone.Core.ImportLists.Simkl { var tentativeTvdbId = int.TryParse(show.Show.Ids.Tvdb, out var tvdbId) ? tvdbId : 0; - if (tentativeTvdbId > 0 && show.AnimeType == SimklAnimeType.Tv) + if (tentativeTvdbId > 0 && show.AnimeType != SimklAnimeType.Movie && show.AnimeType != SimklAnimeType.Music) { series.AddIfNotNull(new ImportListItemInfo() { @@ -55,7 +55,7 @@ namespace NzbDrone.Core.ImportLists.Simkl } else { - Logger.Warn("Skipping info grabbing for '{0}' because it is a movie or it is not the first season of the show", show.Show.Title); + Logger.Warn($"Skipping info grabbing for '{show.Show.Title}' because it is missing a TVDB ID, or it is movie or music video"); } } }