From aa4e8dae59bac9a2bb53942d6df773881df8a0f4 Mon Sep 17 00:00:00 2001
From: cxfksword <718792+cxfksword@users.noreply.github.com>
Date: Fri, 17 Feb 2023 12:19:11 +0800
Subject: [PATCH] Support movie collections
---
.../MovieProviderTest.cs | 3 +-
.../Configuration/PluginConfiguration.cs | 4 +++
.../Configuration/configPage.html | 10 ++++++
Jellyfin.Plugin.MetaShark/Plugin.cs | 33 ++++++++++++++++++-
.../Providers/MovieProvider.cs | 18 ++++++++++
5 files changed, 66 insertions(+), 2 deletions(-)
diff --git a/Jellyfin.Plugin.MetaShark.Test/MovieProviderTest.cs b/Jellyfin.Plugin.MetaShark.Test/MovieProviderTest.cs
index 6cc168f..2c8095d 100644
--- a/Jellyfin.Plugin.MetaShark.Test/MovieProviderTest.cs
+++ b/Jellyfin.Plugin.MetaShark.Test/MovieProviderTest.cs
@@ -32,7 +32,7 @@ namespace Jellyfin.Plugin.MetaShark.Test
[TestMethod]
public void TestGetMetadata()
{
- var info = new MovieInfo() { Name = "南极料理人" };
+
var doubanApi = new DoubanApi(loggerFactory);
var tmdbApi = new TmdbApi(loggerFactory);
var omdbApi = new OmdbApi(loggerFactory);
@@ -42,6 +42,7 @@ namespace Jellyfin.Plugin.MetaShark.Test
Task.Run(async () =>
{
+ var info = new MovieInfo() { Name = "南极料理人", MetadataLanguage = "zh" };
var provider = new MovieProvider(httpClientFactory, loggerFactory, libraryManagerStub.Object, httpContextAccessorStub.Object, doubanApi, tmdbApi, omdbApi);
var result = await provider.GetMetadata(info, CancellationToken.None);
Assert.IsNotNull(result);
diff --git a/Jellyfin.Plugin.MetaShark/Configuration/PluginConfiguration.cs b/Jellyfin.Plugin.MetaShark/Configuration/PluginConfiguration.cs
index 4b47352..9e1fd2b 100644
--- a/Jellyfin.Plugin.MetaShark/Configuration/PluginConfiguration.cs
+++ b/Jellyfin.Plugin.MetaShark/Configuration/PluginConfiguration.cs
@@ -42,6 +42,10 @@ public class PluginConfiguration : BasePluginConfiguration
public bool EnableTmdbSearch { get; set; } = false;
public bool EnableTmdbBackdrop { get; set; } = false;
+ ///