diff --git a/Jellyfin.Plugin.Artwork/Jellyfin.Plugin.Artwork.csproj b/Jellyfin.Plugin.Artwork/Jellyfin.Plugin.Artwork.csproj index b1df74d..0665e63 100644 --- a/Jellyfin.Plugin.Artwork/Jellyfin.Plugin.Artwork.csproj +++ b/Jellyfin.Plugin.Artwork/Jellyfin.Plugin.Artwork.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 true true enable @@ -11,7 +11,7 @@ - + diff --git a/Jellyfin.Plugin.Artwork/PluginServiceRegistrator.cs b/Jellyfin.Plugin.Artwork/PluginServiceRegistrator.cs index 03b26b7..99815fa 100644 --- a/Jellyfin.Plugin.Artwork/PluginServiceRegistrator.cs +++ b/Jellyfin.Plugin.Artwork/PluginServiceRegistrator.cs @@ -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; + +/// +public class PluginServiceRegistrator : IPluginServiceRegistrator { /// - public class PluginServiceRegistrator : IPluginServiceRegistrator + public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost) { - /// - public void RegisterServices(IServiceCollection serviceCollection) - { - serviceCollection.AddSingleton(); - } + serviceCollection.AddSingleton(); } -} \ No newline at end of file +} diff --git a/Jellyfin.Plugin.Artwork/RepositoryCache.cs b/Jellyfin.Plugin.Artwork/RepositoryCache.cs index fff6ca4..534745b 100644 --- a/Jellyfin.Plugin.Artwork/RepositoryCache.cs +++ b/Jellyfin.Plugin.Artwork/RepositoryCache.cs @@ -194,7 +194,8 @@ namespace Jellyfin.Plugin.Artwork private async Task> GetFromRepo(string repositoryUrl) { - if (_memoryCache.TryGetValue(repositoryUrl, out IReadOnlyList cachedArtwork)) + if (_memoryCache.TryGetValue(repositoryUrl, out IReadOnlyList? cachedArtwork) + && cachedArtwork is not null) { return cachedArtwork; } @@ -223,4 +224,4 @@ namespace Jellyfin.Plugin.Artwork return Array.Empty(); } } -} \ No newline at end of file +} diff --git a/build.yaml b/build.yaml index b360b04..812dd99 100644 --- a/build.yaml +++ b/build.yaml @@ -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.