Fixed issue 5839

Added enum entries in simkl API, as well as tweaked the import warning message.
This commit is contained in:
iceypotato 2023-07-24 12:14:23 -07:00
parent 14bea16aef
commit 2b4808fa3f
2 changed files with 10 additions and 3 deletions

View File

@ -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
}
}

View File

@ -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");
}
}
}