This commit is contained in:
Cody Robibero 2024-05-11 13:26:05 -06:00 committed by GitHub
parent f8242a51e3
commit 7c2cbacee8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 16 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>
@ -11,7 +11,7 @@
<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>

View File

@ -1,15 +1,15 @@
using MediaBrowser.Common.Plugins;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Plugins;
using Microsoft.Extensions.DependencyInjection;
namespace Jellyfin.Plugin.Artwork
namespace Jellyfin.Plugin.Artwork;
/// <inheritdoc />
public class PluginServiceRegistrator : IPluginServiceRegistrator
{
/// <inheritdoc />
public class PluginServiceRegistrator : IPluginServiceRegistrator
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
{
/// <inheritdoc />
public void RegisterServices(IServiceCollection serviceCollection)
{
serviceCollection.AddSingleton<IRepositoryCache, RepositoryCache>();
}
serviceCollection.AddSingleton<IRepositoryCache, RepositoryCache>();
}
}
}

View File

@ -194,7 +194,8 @@ namespace Jellyfin.Plugin.Artwork
private async Task<IReadOnlyList<ArtworkDto>> GetFromRepo(string repositoryUrl)
{
if (_memoryCache.TryGetValue(repositoryUrl, out IReadOnlyList<ArtworkDto> cachedArtwork))
if (_memoryCache.TryGetValue(repositoryUrl, out IReadOnlyList<ArtworkDto>? cachedArtwork)
&& cachedArtwork is not null)
{
return cachedArtwork;
}
@ -223,4 +224,4 @@ namespace Jellyfin.Plugin.Artwork
return Array.Empty<ArtworkDto>();
}
}
}
}

View File

@ -2,8 +2,8 @@
name: "Artwork"
guid: "7871D3B1-F1B9-4318-9C27-F35998FFBBCC"
version: "1"
targetAbi: "10.7.0.0"
framework: "net6.0"
targetAbi: "10.9.0.0"
framework: "net8.0"
owner: "jellyfin"
overview: "Download artwork"
description: >
@ -12,4 +12,3 @@ category: "Metadata"
artifacts:
- "Jellyfin.Plugin.Artwork.dll"
changelog: >
Initial release.