From b0cbce77dda22892c01edc67928115cbe568fffb Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Sat, 11 May 2024 13:26:37 -0600 Subject: [PATCH] 10.9 (#64) --- .../Jellyfin.Plugin.AniDB.csproj | 4 ++-- .../AniDB/Metadata/AniDbSeriesProvider.cs | 15 ++++++++------- build.yaml | 14 ++------------ 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/Jellyfin.Plugin.AniDB/Jellyfin.Plugin.AniDB.csproj b/Jellyfin.Plugin.AniDB/Jellyfin.Plugin.AniDB.csproj index 8ca4886..230e97b 100644 --- a/Jellyfin.Plugin.AniDB/Jellyfin.Plugin.AniDB.csproj +++ b/Jellyfin.Plugin.AniDB/Jellyfin.Plugin.AniDB.csproj @@ -1,13 +1,13 @@  - net6.0 + net8.0 Jellyfin.Plugin.AniDB - + diff --git a/Jellyfin.Plugin.AniDB/Providers/AniDB/Metadata/AniDbSeriesProvider.cs b/Jellyfin.Plugin.AniDB/Providers/AniDB/Metadata/AniDbSeriesProvider.cs index 9d8739d..357ad17 100644 --- a/Jellyfin.Plugin.AniDB/Providers/AniDB/Metadata/AniDbSeriesProvider.cs +++ b/Jellyfin.Plugin.AniDB/Providers/AniDB/Metadata/AniDbSeriesProvider.cs @@ -11,6 +11,7 @@ using System.Xml.Linq; using System.Xml.Serialization; using System.Net.Http; +using Jellyfin.Data.Enums; using Jellyfin.Plugin.AniDB.Configuration; using Jellyfin.Plugin.AniDB.Providers.AniDB.Identity; using MediaBrowser.Common.Configuration; @@ -35,11 +36,11 @@ public class AniDbSeriesProvider : IRemoteMetadataProvider, private static readonly Regex _errorRegex = new(@"[a-zA-Z]+", RegexOptions.Compiled); private readonly IApplicationPaths _appPaths; - private readonly Dictionary _typeMappings = new Dictionary + private readonly Dictionary _typeMappings = new() { - {"Direction", PersonType.Director}, - {"Music", PersonType.Composer}, - {"Chief Animation Direction", PersonType.Director} + {"Direction", PersonKind.Director}, + {"Music", PersonKind.Composer}, + {"Chief Animation Direction", PersonKind.Director} }; public AniDbSeriesProvider(IApplicationPaths appPaths) @@ -536,15 +537,15 @@ private PersonInfo CreatePerson(string name, string type, string role = null) { // todo find nationality of person and conditionally reverse name order - if (!_typeMappings.TryGetValue(type, out string mappedType)) + if (!Enum.TryParse(type, out PersonKind personKind)) { - mappedType = type; + personKind = _typeMappings.GetValueOrDefault(type, PersonKind.Actor); } return new PersonInfo { Name = ReverseNameOrder(name), - Type = mappedType, + Type = personKind, Role = role }; } diff --git a/build.yaml b/build.yaml index 2de340c..0671135 100644 --- a/build.yaml +++ b/build.yaml @@ -2,8 +2,8 @@ name: "AniDB" guid: "a2b2a7ed-aa28-4521-a64a-63d86901f246" imageUrl: https://repo.jellyfin.org/releases/plugin/images/jellyfin-plugin-anidb.png version: 7 -targetAbi: "10.8.1.0" -framework: "net6.0" +targetAbi: "10.9.0.0" +framework: "net8.0" owner: "jellyfin" overview: "AniDB metadata provider" description: > @@ -13,13 +13,3 @@ category: "Metadata" artifacts: - "Jellyfin.Plugin.AniDB.dll" changelog: |2- - ### New features and improvements ### - - Add AniDbExternalEpisodeId (#32) @Nalsai - - Add support for "Mahoutsukai" and fix "Gekijyouban" (#31) @Nalsai - - ### Bug Fixes ### - - Fix automatically detecting Movies (#38) @Nalsai - - Add support for "Mahoutsukai" and fix "Gekijyouban" (#31) @Nalsai - - ### CI & build changes ### - - fix: meta ci workflows (#35) @h1dden-da3m0n