Compatible with Jellyfin 10.9. #76
This commit is contained in:
parent
408929fc03
commit
1b547f7aaf
|
@ -4,7 +4,7 @@ on:
|
|||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
dotnet-version: 6.0.x
|
||||
dotnet-version: 8.0.x
|
||||
python-version: 3.8
|
||||
project: Jellyfin.Plugin.MetaShark/Jellyfin.Plugin.MetaShark.csproj
|
||||
artifact: metashark
|
||||
|
@ -36,9 +36,9 @@ jobs:
|
|||
- name: Build
|
||||
run: |
|
||||
dotnet restore ${{ env.project }} --no-cache
|
||||
dotnet publish --nologo --no-restore --configuration=Release --framework=net6.0 ${{ env.project }}
|
||||
dotnet publish --nologo --no-restore --configuration=Release --framework=net8.0 ${{ env.project }}
|
||||
mkdir -p artifacts
|
||||
cp ./Jellyfin.Plugin.MetaShark/bin/Release/net6.0/Jellyfin.Plugin.MetaShark.dll ./artifacts/
|
||||
cp ./Jellyfin.Plugin.MetaShark/bin/Release/net8.0/Jellyfin.Plugin.MetaShark.dll ./artifacts/
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
|
|
@ -14,7 +14,7 @@ jobs:
|
|||
- uses: actions/setup-dotnet@v3
|
||||
id: dotnet
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
dotnet-version: 8.0.x
|
||||
- name: Change default dotnet version
|
||||
run: |
|
||||
echo '{"sdk":{"version": "${{ steps.dotnet.outputs.dotnet-version }}"}}' > ./global.json
|
||||
|
|
|
@ -5,7 +5,7 @@ on:
|
|||
tags: ["*"]
|
||||
|
||||
env:
|
||||
dotnet-version: 6.0.x
|
||||
dotnet-version: 8.0.x
|
||||
python-version: 3.8
|
||||
project: Jellyfin.Plugin.MetaShark/Jellyfin.Plugin.MetaShark.csproj
|
||||
artifact: metashark
|
||||
|
@ -41,9 +41,9 @@ jobs:
|
|||
- name: Build
|
||||
run: |
|
||||
dotnet restore ${{ env.project }} --no-cache
|
||||
dotnet publish --nologo --no-restore --configuration=Release --framework=net6.0 -p:Version=${{steps.vars.outputs.VERSION}} ${{ env.project }}
|
||||
dotnet publish --nologo --no-restore --configuration=Release --framework=net8.0 -p:Version=${{steps.vars.outputs.VERSION}} ${{ env.project }}
|
||||
mkdir -p artifacts
|
||||
zip -j ./artifacts/${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip ./Jellyfin.Plugin.MetaShark/bin/Release/net6.0/Jellyfin.Plugin.MetaShark.dll
|
||||
zip -j ./artifacts/${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip ./Jellyfin.Plugin.MetaShark/bin/Release/net8.0/Jellyfin.Plugin.MetaShark.dll
|
||||
- name: Generate manifest
|
||||
run: python3 ./scripts/generate_manifest.py ./artifacts/${{ env.artifact }}_${{steps.vars.outputs.VERSION}}.zip ${GITHUB_REF#refs/*/}
|
||||
env:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<PackageId>AnitomySharp.NET6</PackageId>
|
||||
<PackageVersion>0.4.0</PackageVersion>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<RootNamespace>Jellyfin.Plugin.MetaShark</RootNamespace>
|
||||
<GenerateDocumentationFile>False</GenerateDocumentationFile>
|
||||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||
|
@ -21,9 +21,12 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AngleSharp" Version="1.0.1" />
|
||||
<PackageReference Include="ILRepack.Lib.MSBuild.Minor" Version="2.1.19-alpha.2" />
|
||||
<PackageReference Include="Jellyfin.Controller" Version="10.8.0" />
|
||||
<PackageReference Include="Jellyfin.Model" Version="10.8.0" />
|
||||
<PackageReference Include="ILRepack.Lib.MSBuild.Task" Version="2.0.32">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Jellyfin.Controller" Version="10.9.0" />
|
||||
<PackageReference Include="Jellyfin.Model" Version="10.9.0" />
|
||||
<PackageReference Include="RateLimiter" Version="2.2.0" />
|
||||
<PackageReference Include="TMDbLib" Version="2.2.0" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -125,13 +125,13 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
item = result.Where(x => x.Year == info.Year && x.Name == searchName).FirstOrDefault();
|
||||
if (item != null)
|
||||
{
|
||||
this.Log($"GuessByDouban found -> {item.Name}({item.Sid}) (suggest)");
|
||||
this.Log($"Found douban [id]: {item.Name}({item.Sid}) (suggest)");
|
||||
return item.Sid;
|
||||
}
|
||||
item = result.Where(x => x.Year == info.Year).FirstOrDefault();
|
||||
if (item != null)
|
||||
{
|
||||
this.Log($"GuessByDouban found -> {item.Name}({item.Sid}) (suggest)");
|
||||
this.Log($"Found douban [id]: {item.Name}({item.Sid}) (suggest)");
|
||||
return item.Sid;
|
||||
}
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
item = result.Where(x => x.Category == cat).FirstOrDefault();
|
||||
if (item != null)
|
||||
{
|
||||
this.Log($"GuessByDouban found -> {item.Name}({item.Sid})");
|
||||
this.Log($"Found douban [id] by first match: {item.Name}({item.Sid})");
|
||||
return item.Sid;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ using System.Net.Http;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using AngleSharp.Text;
|
||||
using Jellyfin.Data.Enums;
|
||||
using Jellyfin.Plugin.MetaShark.Api;
|
||||
using Jellyfin.Plugin.MetaShark.Core;
|
||||
using Jellyfin.Plugin.MetaShark.Model;
|
||||
|
@ -182,7 +183,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
subject.LimitDirectorCelebrities.Take(Configuration.PluginConfiguration.MAX_CAST_MEMBERS).ToList().ForEach(c => result.AddPerson(new PersonInfo
|
||||
{
|
||||
Name = c.Name,
|
||||
Type = c.RoleType,
|
||||
Type = c.RoleType == PersonType.Director ? PersonKind.Director : PersonKind.Actor,
|
||||
Role = c.Role,
|
||||
ImageUrl = this.GetLocalProxyImageUrl(c.Img),
|
||||
ProviderIds = new Dictionary<string, string> { { DoubanProviderId, c.Id } },
|
||||
|
@ -301,7 +302,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
{
|
||||
Name = actor.Name.Trim(),
|
||||
Role = actor.Character,
|
||||
Type = PersonType.Actor,
|
||||
Type = PersonKind.Actor,
|
||||
SortOrder = actor.Order,
|
||||
};
|
||||
|
||||
|
@ -344,7 +345,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
{
|
||||
Name = person.Name.Trim(),
|
||||
Role = person.Job,
|
||||
Type = type
|
||||
Type = type == PersonType.Director ? PersonKind.Director : (type == PersonType.Producer ? PersonKind.Producer : PersonKind.Actor),
|
||||
};
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(person.ProfilePath))
|
||||
|
|
|
@ -14,6 +14,7 @@ using System.Net.Http;
|
|||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Jellyfin.Data.Enums;
|
||||
|
||||
namespace Jellyfin.Plugin.MetaShark.Providers
|
||||
{
|
||||
|
@ -89,7 +90,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
subject.LimitDirectorCelebrities.Take(Configuration.PluginConfiguration.MAX_CAST_MEMBERS).ToList().ForEach(c => result.AddPerson(new PersonInfo
|
||||
{
|
||||
Name = c.Name,
|
||||
Type = c.RoleType,
|
||||
Type = c.RoleType == PersonType.Director ? PersonKind.Director : PersonKind.Actor,
|
||||
Role = c.Role,
|
||||
ImageUrl = this.GetLocalProxyImageUrl(c.Img),
|
||||
ProviderIds = new Dictionary<string, string> { { DoubanProviderId, c.Id } },
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using Jellyfin.Plugin.MetaShark.Api;
|
||||
using Jellyfin.Data.Enums;
|
||||
using Jellyfin.Plugin.MetaShark.Api;
|
||||
using Jellyfin.Plugin.MetaShark.Model;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.TV;
|
||||
|
@ -152,7 +153,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
subject.LimitDirectorCelebrities.Take(Configuration.PluginConfiguration.MAX_CAST_MEMBERS).ToList().ForEach(c => result.AddPerson(new PersonInfo
|
||||
{
|
||||
Name = c.Name,
|
||||
Type = c.RoleType,
|
||||
Type = c.RoleType == PersonType.Director ? PersonKind.Director : PersonKind.Actor,
|
||||
Role = c.Role,
|
||||
ImageUrl = this.GetLocalProxyImageUrl(c.Img),
|
||||
ProviderIds = new Dictionary<string, string> { { DoubanProviderId, c.Id } },
|
||||
|
@ -356,7 +357,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
{
|
||||
Name = actor.Name.Trim(),
|
||||
Role = actor.Character,
|
||||
Type = PersonType.Actor,
|
||||
Type = PersonKind.Actor,
|
||||
SortOrder = actor.Order,
|
||||
};
|
||||
|
||||
|
@ -400,7 +401,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
{
|
||||
Name = person.Name.Trim(),
|
||||
Role = person.Job,
|
||||
Type = type
|
||||
Type = type == PersonType.Director ? PersonKind.Director : (type == PersonType.Producer ? PersonKind.Producer : PersonKind.Actor),
|
||||
};
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(person.ProfilePath))
|
||||
|
|
|
@ -1,18 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Plugin.MetaShark.Api;
|
||||
using Jellyfin.Plugin.MetaShark.Providers;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.Common.Plugins;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Controller.Plugins;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using System.Net.Http;
|
||||
|
||||
namespace Jellyfin.Plugin.MetaShark
|
||||
{
|
||||
|
@ -20,21 +10,22 @@ namespace Jellyfin.Plugin.MetaShark
|
|||
public class ServiceRegistrator : IPluginServiceRegistrator
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public void RegisterServices(IServiceCollection serviceCollection)
|
||||
public void RegisterServices(IServiceCollection serviceCollection, IServerApplicationHost applicationHost)
|
||||
{
|
||||
serviceCollection.AddSingleton<DoubanApi>((ctx) =>
|
||||
|
||||
serviceCollection.AddSingleton((ctx) =>
|
||||
{
|
||||
return new DoubanApi(ctx.GetRequiredService<ILoggerFactory>());
|
||||
});
|
||||
serviceCollection.AddSingleton<TmdbApi>((ctx) =>
|
||||
serviceCollection.AddSingleton((ctx) =>
|
||||
{
|
||||
return new TmdbApi(ctx.GetRequiredService<ILoggerFactory>());
|
||||
});
|
||||
serviceCollection.AddSingleton<OmdbApi>((ctx) =>
|
||||
serviceCollection.AddSingleton((ctx) =>
|
||||
{
|
||||
return new OmdbApi(ctx.GetRequiredService<ILoggerFactory>());
|
||||
});
|
||||
serviceCollection.AddSingleton<ImdbApi>((ctx) =>
|
||||
serviceCollection.AddSingleton((ctx) =>
|
||||
{
|
||||
return new ImdbApi(ctx.GetRequiredService<ILoggerFactory>());
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# jellyfin-plugin-metashark
|
||||
|
||||
[](https://github.com/cxfksword/jellyfin-plugin-metashark/releases)
|
||||
[](https://github.com/cxfksword/jellyfin-plugin-metashark/releases)
|
||||
[](https://github.com/cxfksword/jellyfin-plugin-metashark/releases)
|
||||
[](https://github.com/cxfksword/jellyfin-plugin-metashark/main/LICENSE)
|
||||
|
||||
jellyfin电影元数据插件,影片信息只要从豆瓣获取,并由TheMovieDb补全缺失的剧集数据。
|
||||
|
@ -14,8 +14,6 @@ jellyfin电影元数据插件,影片信息只要从豆瓣获取,并由TheMov
|
|||
|
||||
## 安装插件
|
||||
|
||||
只支持最新的`jellyfin 10.8.x`版本
|
||||
|
||||
添加插件存储库:
|
||||
|
||||
国内加速:https://mirror.ghproxy.com/https://github.com/cxfksword/jellyfin-plugin-metashark/releases/download/manifest/manifest_cn.json
|
||||
|
@ -42,7 +40,7 @@ jellyfin电影元数据插件,影片信息只要从豆瓣获取,并由TheMov
|
|||
|
||||
1. Clone or download this repository
|
||||
|
||||
2. Ensure you have .NET Core SDK 6.0 setup and installed
|
||||
2. Ensure you have .NET Core SDK 8.0 setup and installed
|
||||
|
||||
3. Build plugin with following command.
|
||||
|
||||
|
@ -56,7 +54,7 @@ dotnet publish --configuration=Release Jellyfin.Plugin.MetaShark/Jellyfin.Plugin
|
|||
|
||||
1. Build the plugin
|
||||
|
||||
2. Create a folder, like `metashark` and copy `./Jellyfin.Plugin.MetaShark/bin/Release/net6.0/Jellyfin.Plugin.MetaShark.dll` into it
|
||||
2. Create a folder, like `metashark` and copy `./Jellyfin.Plugin.MetaShark/bin/Release/net8.0/Jellyfin.Plugin.MetaShark.dll` into it
|
||||
|
||||
3. Move folder `metashark` to jellyfin `data/plugins` folder
|
||||
|
||||
|
|
Loading…
Reference in New Issue