Fixed issue 5839
Added enum entries in simkl API, as well as tweaked the import warning message.
This commit is contained in:
parent
14bea16aef
commit
2b4808fa3f
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.Serialization;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace NzbDrone.Core.ImportLists.Simkl
|
namespace NzbDrone.Core.ImportLists.Simkl
|
||||||
|
@ -75,6 +76,12 @@ namespace NzbDrone.Core.ImportLists.Simkl
|
||||||
public enum SimklAnimeType
|
public enum SimklAnimeType
|
||||||
{
|
{
|
||||||
Tv,
|
Tv,
|
||||||
Movie
|
Movie,
|
||||||
|
Ova,
|
||||||
|
Ona,
|
||||||
|
Special,
|
||||||
|
|
||||||
|
[EnumMember(Value = "music video")]
|
||||||
|
Music
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace NzbDrone.Core.ImportLists.Simkl
|
||||||
{
|
{
|
||||||
var tentativeTvdbId = int.TryParse(show.Show.Ids.Tvdb, out var tvdbId) ? tvdbId : 0;
|
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()
|
series.AddIfNotNull(new ImportListItemInfo()
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@ namespace NzbDrone.Core.ImportLists.Simkl
|
||||||
}
|
}
|
||||||
else
|
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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue