This commit is contained in:
Cody Robibero 2024-05-11 13:26:09 -06:00 committed by GitHub
parent 2a7dfe78c0
commit de02e89875
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 19 deletions

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>
@ -16,13 +16,13 @@
<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>
<!-- Code Analyzers-->
<ItemGroup>
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="All" />
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
</ItemGroup>

View File

@ -1,4 +1,5 @@
using MediaBrowser.Common.Plugins;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Plugins;
using Microsoft.Extensions.DependencyInjection;
namespace Jellyfin.Plugin.IMVDb;
@ -9,7 +10,7 @@ namespace Jellyfin.Plugin.IMVDb;
public class PluginServiceRegistrator : IPluginServiceRegistrator
{
/// <inheritdoc />
public void RegisterServices(IServiceCollection serviceCollection)
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
{
serviceCollection.AddScoped<IImvdbClient, ImvdbClient>();
}

View File

@ -5,6 +5,7 @@ using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Data.Enums;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
@ -78,16 +79,14 @@ public class ImvdbProvider : IRemoteMetadataProvider<MusicVideo, MusicVideoInfo>
{
Name = releaseResult.SongTitle,
ProductionYear = releaseResult.Year,
Artists = releaseResult.Artists.Select(i => i.Name).ToArray(),
ImageInfos = new[]
{
new ItemImageInfo
{
Path = releaseResult.Image?.Size1
}
}
Artists = releaseResult.Artists.Select(i => i.Name).ToArray()
};
if (!string.IsNullOrEmpty(releaseResult.Image?.Size1))
{
result.Item.ImageInfos = [new ItemImageInfo { Path = releaseResult.Image.Size1 }];
}
foreach (var director in releaseResult.Directors)
{
result.AddPerson(new PersonInfo
@ -98,7 +97,7 @@ public class ImvdbProvider : IRemoteMetadataProvider<MusicVideo, MusicVideoInfo>
{ ImvdbPlugin.ProviderName, director.Id.ToString(CultureInfo.InvariantCulture) },
{ ImvdbPlugin.ProviderName + "_slug", director.Url },
},
Type = director.Position
Type = PersonKind.Director
});
}

View File

@ -2,8 +2,8 @@
name: "IMVDb"
guid: "e29621a5-fa9e-4330-982e-ef6e54c0cad2"
version: "4"
targetAbi: "10.8.0.0"
framework: "net6.0"
targetAbi: "10.9.0.0"
framework: "net8.0"
owner: "jellyfin"
overview: "Get Music Video metadata from IMVDb"
description: >
@ -13,7 +13,4 @@ category: "Metadata"
artifacts:
- "Jellyfin.Plugin.IMVDb.dll"
changelog: |-
- Use meta ci (#8) @crobibero
### Code or Repo Maintenance ###
- 10.8 support (#11) @crobibero