Skip to content

Commit

Permalink
10.9
Browse files Browse the repository at this point in the history
  • Loading branch information
crobibero committed Mar 25, 2024
1 parent ab44a8e commit 9fafb76
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Jellyfin.Plugin.AniDB/Jellyfin.Plugin.AniDB.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Jellyfin.Plugin.AniDB</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Jellyfin.Controller" Version="10.*-*" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -35,11 +36,11 @@ public class AniDbSeriesProvider : IRemoteMetadataProvider<Series, SeriesInfo>,
private static readonly Regex _errorRegex = new(@"<error code=""[0-9]+"">[a-zA-Z]+</error>", RegexOptions.Compiled);
private readonly IApplicationPaths _appPaths;

private readonly Dictionary<string, string> _typeMappings = new Dictionary<string, string>
private readonly Dictionary<string, PersonKind> _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)
Expand Down Expand Up @@ -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
};
}
Expand Down
14 changes: 2 additions & 12 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >
Expand All @@ -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

0 comments on commit 9fafb76

Please sign in to comment.