Merge pull request #15 from jellyfin/joshuaboniface-patch-1

Correct build issues for 10.5.0
This commit is contained in:
dkanada 2020-03-29 19:55:20 +09:00 committed by GitHub
commit 5481fc298b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 17 additions and 13 deletions

View File

@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<RootNamespace>Jellyfin.Plugin.Fanart</RootNamespace>
<AssemblyVersion>3.0.0</AssemblyVersion>
<FileVersion>3.0.0</FileVersion>
<AssemblyVersion>4.0.0</AssemblyVersion>
<FileVersion>4.0.0</FileVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

View File

@ -10,6 +10,7 @@ namespace Jellyfin.Plugin.Fanart
{
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
{
private readonly Guid _id = new Guid("170a157f-ac6c-437a-abdd-ca9c25cebd39");
public const string ApiKey = "184e1a2b1fe3b94935365411f919f638";
public const string BaseUrl = "https://webservice.fanart.tv/v3/{2}/{1}?api_key={0}";
@ -23,7 +24,7 @@ namespace Jellyfin.Plugin.Fanart
public override string Name => "Fanart";
/// <inheritdoc />
public override Guid Id { get; } = new Guid("170a157f-ac6c-437a-abdd-ca9c25cebd39");
public override Guid Id => _id;
public static Plugin Instance { get; private set; }

View File

@ -7,6 +7,7 @@ using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Plugin.Fanart.Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration;
@ -253,9 +254,9 @@ namespace Jellyfin.Plugin.Fanart.Providers
},
HttpMethod.Get).ConfigureAwait(false))
using (var response = httpResponse.Content)
using (var saveFileStream = new FileStream(jsonPath, FileMode.Create, FileAccess.Write, FileShare.Read, StreamDefaults.DefaultFileStreamBufferSize, true))
using (var saveFileStream = new FileStream(jsonPath, FileMode.Create, FileAccess.Write, FileShare.Read, IODefaults.FileStreamBufferSize, FileOptions.Asynchronous))
{
await response.CopyToAsync(saveFileStream).ConfigureAwait(false);
await response.CopyToAsync(saveFileStream, CancellationToken.None).ConfigureAwait(false);
}
}
catch (HttpException ex)

View File

@ -7,6 +7,7 @@ using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Plugin.Fanart.Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration;
@ -271,9 +272,9 @@ namespace Jellyfin.Plugin.Fanart.Providers
},
HttpMethod.Get).ConfigureAwait(false))
using (var response = httpResponse.Content)
using (var fileStream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read, StreamDefaults.DefaultFileStreamBufferSize, true))
using (var fileStream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read, IODefaults.FileStreamBufferSize, FileOptions.Asynchronous))
{
await response.CopyToAsync(fileStream).ConfigureAwait(false);
await response.CopyToAsync(fileStream, CancellationToken.None).ConfigureAwait(false);
}
}
catch (HttpException exception)

View File

@ -7,6 +7,7 @@ using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Plugin.Fanart.Configuration;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration;
@ -316,9 +317,9 @@ namespace Jellyfin.Plugin.Fanart.Providers
},
HttpMethod.Get).ConfigureAwait(false))
using (var response = httpResponse.Content)
using (var fileStream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read, StreamDefaults.DefaultFileStreamBufferSize, true))
using (var fileStream = new FileStream(path, FileMode.Create, FileAccess.Write, FileShare.Read, IODefaults.FileStreamBufferSize, FileOptions.Asynchronous))
{
await response.CopyToAsync(fileStream).ConfigureAwait(false);
await response.CopyToAsync(fileStream, CancellationToken.None).ConfigureAwait(false);
}
}
catch (HttpException exception)

View File

@ -1,8 +1,8 @@
---
name: "jellyfin-plugin-fanart"
guid: "170a157f-ac6c-437a-abdd-ca9c25cebd39"
version: "3"
jellyfin_version: "10.4.0"
version: "4"
jellyfin_version: "10.5.0"
nicename: "Fanart"
description: "Scrape poster images from fanart.tv"
overview: "Scrape poster images for movies, shows, and artists in your library."
@ -12,4 +12,4 @@ artifacts:
- "Jellyfin.Plugin.Fanart.dll"
build_type: "dotnet"
dotnet_configuration: "Release"
dotnet_framework: "netstandard2.0"
dotnet_framework: "netstandard2.1"