added support for jellyfin 10.8.0
This commit is contained in:
@@ -4,8 +4,9 @@ using System.Net.Http.Headers;
|
|||||||
using System.Net.Http.Json;
|
using System.Net.Http.Json;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
using Jellyfin.Data.Enums;
|
||||||
|
using Jellyfin.Extensions.Json;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Common.Json;
|
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Jellyfin.Plugin.AnilistSync.API.Exceptions;
|
using Jellyfin.Plugin.AnilistSync.API.Exceptions;
|
||||||
@@ -65,7 +66,7 @@ mutation ($id: Int, $mediaId: Int, $status: MediaListStatus, $progress: Int,) {
|
|||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_httpClientFactory = httpClientFactory;
|
_httpClientFactory = httpClientFactory;
|
||||||
_jsonSerializerOptions = JsonDefaults.GetOptions();
|
_jsonSerializerOptions = JsonDefaults.Options;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net5.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
<AssemblyVersion>1.0.0.0</AssemblyVersion>
|
||||||
<FileVersion>1.0.0.0</FileVersion>
|
<FileVersion>1.0.0.0</FileVersion>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Jellyfin.Controller" Version="10.7-*" />
|
<PackageReference Include="Jellyfin.Controller" Version="10.*-*" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="5.*" />
|
<PackageReference Include="Microsoft.Extensions.Http" Version="5.*" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Jellyfin.Data.Enums;
|
||||||
using Jellyfin.Plugin.AnilistSync.API;
|
using Jellyfin.Plugin.AnilistSync.API;
|
||||||
using Jellyfin.Plugin.AnilistSync.API.Exceptions;
|
using Jellyfin.Plugin.AnilistSync.API.Exceptions;
|
||||||
using Jellyfin.Plugin.AnilistSync.Configuration;
|
using Jellyfin.Plugin.AnilistSync.Configuration;
|
||||||
@@ -95,8 +96,8 @@ namespace Jellyfin.Plugin.AnilistSync.Services
|
|||||||
// Check if movie or episode then check against user config
|
// Check if movie or episode then check against user config
|
||||||
return playbackProgress.MediaInfo.Type switch
|
return playbackProgress.MediaInfo.Type switch
|
||||||
{
|
{
|
||||||
nameof(Movie) => userConfig.ScrobbleMovies,
|
BaseItemKind.Movie => userConfig.ScrobbleMovies,
|
||||||
nameof(Episode) => userConfig.ScrobbleShows,
|
BaseItemKind.Episode => userConfig.ScrobbleShows,
|
||||||
_ => false
|
_ => false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user