WIP: Upgrade to .NET 8.0 and improve build scripts
- Upgraded all projects from .NET 6.0 to .NET 8.0. - Updated GitHub Actions workflow to use .NET 8.0. - Changed `publish.sh` script to check for `gsed` command, update version to 10.9.0.0, and use dotnet@8. - Adjusted target ABI in various configurations and manifests to match the new version. - Replaced `PersonType` with `PersonKind` in `ApiModelExtensions.cs` and adjusted profession mapping accordingly. - Updated package references across all projects to be compatible with .NET 8.0. - Modified `KinopoiskPluginServiceRegistrator` to match updated interface with `IServerApplicationHost`. - General cleanup and consistency improvements in project files and build configurations.
This commit is contained in:
9 files changed
+50
-43
No files matched your search
@@ -13,10 +13,10 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup .NET 6.0
|
- name: Setup .NET 8.0
|
||||||
uses: actions/setup-dotnet@v3
|
uses: actions/setup-dotnet@v3
|
||||||
with:
|
with:
|
||||||
dotnet-version: 6.0.x
|
dotnet-version: 8.0.x
|
||||||
|
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: dotnet build --configuration Release ./src
|
run: dotnet build --configuration Release ./src
|
||||||
|
|||||||
+19
-8
@@ -1,9 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
VERSION="10.8.9.3"
|
VERSION="10.9.0.0"
|
||||||
CHANGELOG="Fix bugs"
|
CHANGELOG="Fix bugs"
|
||||||
|
|
||||||
brew link --overwrite dotnet@6
|
check_command() {
|
||||||
export PATH="/usr/local/opt/dotnet@6/bin:$PATH"
|
if ! command -v $1 &> /dev/null
|
||||||
|
then
|
||||||
|
echo "Error: $1 could not be found. Please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Check for required commands
|
||||||
|
check_command gsed
|
||||||
|
|
||||||
|
brew link --overwrite dotnet@8
|
||||||
|
export PATH="/usr/local/opt/dotnet@8/bin:$PATH"
|
||||||
|
|
||||||
find . -name project.assets.json -delete
|
find . -name project.assets.json -delete
|
||||||
|
|
||||||
@@ -17,8 +28,8 @@ dotnet build --configuration Release ./src/Jellyfin.Plugin.Kinopoisk/
|
|||||||
RELEASEDIR="$(pwd)/dist/kinopoisk/kinopoisk_$VERSION"
|
RELEASEDIR="$(pwd)/dist/kinopoisk/kinopoisk_$VERSION"
|
||||||
rm -rf "$RELEASEDIR" "$RELEASEDIR.zip"
|
rm -rf "$RELEASEDIR" "$RELEASEDIR.zip"
|
||||||
mkdir -p "$RELEASEDIR"
|
mkdir -p "$RELEASEDIR"
|
||||||
cp "$(pwd)/src/Jellyfin.Plugin.Kinopoisk/bin/Release/net6.0/Jellyfin.Plugin.Kinopoisk.dll" "$RELEASEDIR/"
|
cp "$(pwd)/src/Jellyfin.Plugin.Kinopoisk/bin/Release/net8.0/Jellyfin.Plugin.Kinopoisk.dll" "$RELEASEDIR/"
|
||||||
cp "$(pwd)/src/KinopoiskUnofficialInfo.ApiClient/bin/Release/net6.0/KinopoiskUnofficialInfo.ApiClient.dll" "$RELEASEDIR/"
|
cp "$(pwd)/src/KinopoiskUnofficialInfo.ApiClient/bin/Release/net8.0/KinopoiskUnofficialInfo.ApiClient.dll" "$RELEASEDIR/"
|
||||||
cat << EOF > "dist/kinopoisk/kinopoisk_$VERSION/meta.json"
|
cat << EOF > "dist/kinopoisk/kinopoisk_$VERSION/meta.json"
|
||||||
{
|
{
|
||||||
"category": "Metadata",
|
"category": "Metadata",
|
||||||
@@ -29,7 +40,7 @@ cat << EOF > "dist/kinopoisk/kinopoisk_$VERSION/meta.json"
|
|||||||
"name": "\u041a\u0438\u043d\u043e\u041f\u043e\u0438\u0441\u043a",
|
"name": "\u041a\u0438\u043d\u043e\u041f\u043e\u0438\u0441\u043a",
|
||||||
"overview": "\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0444\u0438\u043b\u044c\u043c\u0430\u0445 \u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0430\u0445 \u0441 \u041a\u0438\u043d\u043e\u041f\u043e\u0438\u0441\u043a\u0430",
|
"overview": "\u0418\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0444\u0438\u043b\u044c\u043c\u0430\u0445 \u0438 \u0441\u0435\u0440\u0438\u0430\u043b\u0430\u0445 \u0441 \u041a\u0438\u043d\u043e\u041f\u043e\u0438\u0441\u043a\u0430",
|
||||||
"owner": "svk",
|
"owner": "svk",
|
||||||
"targetAbi": "10.8.0",
|
"targetAbi": "10.9.0",
|
||||||
"timestamp": "$(date -u "+%Y-%m-%dT%H:%M:%SZ")",
|
"timestamp": "$(date -u "+%Y-%m-%dT%H:%M:%SZ")",
|
||||||
"version": "$VERSION"
|
"version": "$VERSION"
|
||||||
}
|
}
|
||||||
@@ -41,10 +52,10 @@ HASH=$(md5sum "$RELEASEDIR.zip" | cut -d' ' -f1)
|
|||||||
jq --arg HASH "$HASH" --arg URL "https://raw.githubusercontent.com/skrashevich/jellyfin-plugin-kinopoisk/master/dist/kinopoisk/kinopoisk_$VERSION.zip" \
|
jq --arg HASH "$HASH" --arg URL "https://raw.githubusercontent.com/skrashevich/jellyfin-plugin-kinopoisk/master/dist/kinopoisk/kinopoisk_$VERSION.zip" \
|
||||||
--arg TIMESTAMP "$(date -u "+%Y-%m-%dT%H:%M:%SZ")" \
|
--arg TIMESTAMP "$(date -u "+%Y-%m-%dT%H:%M:%SZ")" \
|
||||||
--arg VERSION "$VERSION" \
|
--arg VERSION "$VERSION" \
|
||||||
'.[0].versions |= [{"version": $VERSION, "checksum": $HASH, "changelog": "new release", "name": "\u041a\u0438\u043d\u043e\u041f\u043e\u0438\u0441\u043a", "targetAbi": "10.8.8.0", "sourceUrl": $URL, "timestamp": $TIMESTAMP}] + .' \
|
'.[0].versions |= [{"version": $VERSION, "checksum": $HASH, "changelog": "new release", "name": "\u041a\u0438\u043d\u043e\u041f\u043e\u0438\u0441\u043a", "targetAbi": "10.9.0", "sourceUrl": $URL, "timestamp": $TIMESTAMP}] + .' \
|
||||||
"$(pwd)/dist/manifest.json" > "$(pwd)/dist/manifest.json.tmp" && \
|
"$(pwd)/dist/manifest.json" > "$(pwd)/dist/manifest.json.tmp" && \
|
||||||
mv "$(pwd)/dist/manifest.json.tmp" "$(pwd)/dist/manifest.json"
|
mv "$(pwd)/dist/manifest.json.tmp" "$(pwd)/dist/manifest.json"
|
||||||
|
exit
|
||||||
#jprm repo add -u https://raw.githubusercontent.com/skrashevich/jellyfin-plugin-kinopoisk/master/dist/ ./dist ./artifacts/*.zip
|
#jprm repo add -u https://raw.githubusercontent.com/skrashevich/jellyfin-plugin-kinopoisk/master/dist/ ./dist ./artifacts/*.zip
|
||||||
rm -rf ./artifacts/*
|
rm -rf ./artifacts/*
|
||||||
git add "$RELEASEDIR.zip" "dist/manifest.json" "publish.sh" "src/Jellyfin.Plugin.Kinopoisk/build.yaml" && \
|
git add "$RELEASEDIR.zip" "dist/manifest.json" "publish.sh" "src/Jellyfin.Plugin.Kinopoisk/build.yaml" && \
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ using MediaBrowser.Controller.Entities.TV;
|
|||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.Providers;
|
using MediaBrowser.Model.Providers;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Jellyfin.Data.Enums;
|
||||||
|
using Jellyfin.Extensions;
|
||||||
|
|
||||||
namespace Jellyfin.Plugin.Kinopoisk
|
namespace Jellyfin.Plugin.Kinopoisk
|
||||||
{
|
{
|
||||||
@@ -237,7 +239,7 @@ namespace Jellyfin.Plugin.Kinopoisk
|
|||||||
{
|
{
|
||||||
Name = src.NameRu,
|
Name = src.NameRu,
|
||||||
ImageUrl = src.PosterUrl,
|
ImageUrl = src.PosterUrl,
|
||||||
Role = src.ProfessionText ?? string.Empty,
|
Role = src.ProfessionText ?? null,
|
||||||
Type = src.ProfessionKey.ToPersonType()
|
Type = src.ProfessionKey.ToPersonType()
|
||||||
};
|
};
|
||||||
if (string.IsNullOrWhiteSpace(res.Name))
|
if (string.IsNullOrWhiteSpace(res.Name))
|
||||||
@@ -267,12 +269,12 @@ namespace Jellyfin.Plugin.Kinopoisk
|
|||||||
{
|
{
|
||||||
return src switch
|
return src switch
|
||||||
{
|
{
|
||||||
StaffResponseProfessionKey.ACTOR => PersonType.Actor,
|
StaffResponseProfessionKey.ACTOR => PersonKind.Actor,
|
||||||
StaffResponseProfessionKey.DIRECTOR => PersonType.Director,
|
StaffResponseProfessionKey.DIRECTOR => PersonKind.Director,
|
||||||
StaffResponseProfessionKey.WRITER => PersonType.Writer,
|
StaffResponseProfessionKey.WRITER => PersonKind.Writer,
|
||||||
StaffResponseProfessionKey.COMPOSER => PersonType.Composer,
|
StaffResponseProfessionKey.COMPOSER => PersonKind.Composer,
|
||||||
StaffResponseProfessionKey.PRODUCER or StaffResponseProfessionKey.PRODUCER_USSR => PersonType.Producer,
|
StaffResponseProfessionKey.PRODUCER or StaffResponseProfessionKey.PRODUCER_USSR => PersonKind.Producer,
|
||||||
_ => string.Empty,
|
_ => null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<DebugType>portable</DebugType>
|
<DebugType>portable</DebugType>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
@@ -10,19 +10,12 @@
|
|||||||
<EmbeddedResource Include="Configuration\configPage.html" />
|
<EmbeddedResource Include="Configuration\configPage.html" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Jellyfin.Controller" Version="10.*">
|
<PackageReference Include="Jellyfin.Data" Version="10.*-*" />
|
||||||
<IncludeAssets>compile</IncludeAssets>
|
<PackageReference Include="Jellyfin.Controller" Version="10.*-*" />
|
||||||
</PackageReference>
|
<PackageReference Include="Jellyfin.Common" Version="10.*-*" />
|
||||||
<PackageReference Include="Jellyfin.Model" Version="10.*">
|
<PackageReference Include="Jellyfin.Model" Version="10.*-*" />
|
||||||
<IncludeAssets>compile</IncludeAssets>
|
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0">
|
|
||||||
<IncludeAssets>compile</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="System.Text.Json" Version="6.*">
|
|
||||||
<IncludeAssets>compile</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using Jellyfin.Plugin.Kinopoisk.ProviderIdResolvers;
|
using Jellyfin.Plugin.Kinopoisk.ProviderIdResolvers;
|
||||||
using KinopoiskUnofficialInfo.ApiClient;
|
using KinopoiskUnofficialInfo.ApiClient;
|
||||||
using MediaBrowser.Common.Plugins;
|
using MediaBrowser.Controller;
|
||||||
|
using MediaBrowser.Controller.Plugins;
|
||||||
using MediaBrowser.Controller.Entities;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Controller.Providers;
|
using MediaBrowser.Controller.Providers;
|
||||||
using Microsoft.Extensions.Caching.Memory;
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
@@ -15,7 +16,7 @@ namespace Jellyfin.Plugin.Kinopoisk
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class KinopoiskPluginServiceRegistrator : IPluginServiceRegistrator
|
public class KinopoiskPluginServiceRegistrator : IPluginServiceRegistrator
|
||||||
{
|
{
|
||||||
public void RegisterServices(IServiceCollection serviceCollection)
|
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
|
||||||
{
|
{
|
||||||
serviceCollection.AddSingleton((sp) => new KinopoiskApiClient(
|
serviceCollection.AddSingleton((sp) => new KinopoiskApiClient(
|
||||||
Plugin.Instance.Configuration.ApiToken,
|
Plugin.Instance.Configuration.ApiToken,
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
name: "КиноПоиск"
|
name: "КиноПоиск"
|
||||||
guid: "0c136f8a-ff77-4f2b-ade5-13462cae6216"
|
guid: "0c136f8a-ff77-4f2b-ade5-13462cae6216"
|
||||||
imageUrl: "https://kinopoisk.userecho.com/s/attachments/28876/0/1/25f8c0315e6ccb2aa6c2642e48f2c9e9.png"
|
imageUrl: "https://kinopoisk.userecho.com/s/attachments/28876/0/1/25f8c0315e6ccb2aa6c2642e48f2c9e9.png"
|
||||||
version: "10.8.9.3"
|
version: "10.9.0.0"
|
||||||
targetAbi: "10.8.8.0"
|
targetAbi: "10.9.0"
|
||||||
framework: "net6.0"
|
framework: "net8.0"
|
||||||
owner: "svk"
|
owner: "svk"
|
||||||
overview: "Информация о фильмах и сериалах с КиноПоиска"
|
overview: "Информация о фильмах и сериалах с КиноПоиска"
|
||||||
description: >
|
description: >
|
||||||
|
|||||||
+2
-2
@@ -1,13 +1,13 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
|
||||||
<PackageReference Include="xunit" Version="2.4.2" />
|
<PackageReference Include="xunit" Version="2.4.2" />
|
||||||
<PackageReference Include="Moq" Version="4.18.4" />
|
<PackageReference Include="Moq" Version="4.18.4" />
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||||
<PackageReference Include="NSwag.MSBuild" Version="13.18.2">
|
<PackageReference Include="NSwag.MSBuild" Version="13.18.2">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
|||||||
Reference in new issue
Block a user