();
+
+ Task.Run(async () =>
+ {
+ var provider = new MovieImageProvider(httpClientFactory, loggerFactory, libraryManagerStub.Object, httpContextAccessorStub.Object, doubanApi, tmdbApi, omdbApi);
+ var result = await provider.GetImages(info, CancellationToken.None);
+ Assert.IsNotNull(result);
+
+ var str = result.ToJson();
+ Console.WriteLine(result.ToJson());
+ }).GetAwaiter().GetResult();
+ }
+
+ }
+}
diff --git a/Jellyfin.Plugin.MetaShark.Test/ParseNameTest.cs b/Jellyfin.Plugin.MetaShark.Test/ParseNameTest.cs
index ba12dc9..feeba9a 100644
--- a/Jellyfin.Plugin.MetaShark.Test/ParseNameTest.cs
+++ b/Jellyfin.Plugin.MetaShark.Test/ParseNameTest.cs
@@ -54,6 +54,14 @@ namespace Jellyfin.Plugin.MetaShark.Test
parseResult = NameParser.Parse(fileName);
Console.WriteLine(parseResult.ToJson());
+ // 只中文
+ fileName = "机动战士高达 逆袭的夏亚";
+ parseResult = NameParser.Parse(fileName);
+ Console.WriteLine(parseResult.ToJson());
+
+ fileName = "秒速5厘米";
+ parseResult = NameParser.Parse(fileName);
+ Console.WriteLine(parseResult.ToJson());
// 标题加年份
@@ -98,6 +106,9 @@ namespace Jellyfin.Plugin.MetaShark.Test
// anime混合中日文
fileName = "[异域-11番小队][罗马浴场 THERMAE_ROMAE][1-6+SP][BDRIP][720P][X264-10bit_AAC]";
+ var anitomyResult = AnitomySharp.AnitomySharp.Parse(fileName);
+ Console.WriteLine(anitomyResult.ToJson());
+
parseResult = NameParser.Parse(fileName);
Console.WriteLine(parseResult.ToJson());
@@ -121,9 +132,6 @@ namespace Jellyfin.Plugin.MetaShark.Test
// 只英文
fileName = "She-Hulk.Attorney.At.Law.S01E01.1080p.WEBRip.x265-RARBG";
- var anitomyResult = AnitomySharp.AnitomySharp.Parse(fileName);
- Console.WriteLine(anitomyResult.ToJson());
-
parseResult = NameParser.Parse(fileName);
Console.WriteLine(parseResult.ToJson());
diff --git a/Jellyfin.Plugin.MetaShark/Api/DoubanApi.cs b/Jellyfin.Plugin.MetaShark/Api/DoubanApi.cs
index 1a7e2fa..233526b 100644
--- a/Jellyfin.Plugin.MetaShark/Api/DoubanApi.cs
+++ b/Jellyfin.Plugin.MetaShark/Api/DoubanApi.cs
@@ -79,8 +79,8 @@ namespace Jellyfin.Plugin.MetaShark.Api
Regex regFamily = new Regex(@"家庭成员: \n(.+?)\n", RegexOptions.Compiled);
Regex regCelebrityImdb = new Regex(@"imdb编号:\s+?(nm\d+)", RegexOptions.Compiled);
- // 默认1秒请求1次
- private TimeLimiter _defaultTimeConstraint = TimeLimiter.GetFromMaxCountByInterval(1, TimeSpan.FromMilliseconds(1000));
+ // 默认500毫秒请求1次
+ private TimeLimiter _defaultTimeConstraint = TimeLimiter.GetFromMaxCountByInterval(1, TimeSpan.FromMilliseconds(500));
// 未登录最多1分钟10次请求,不然5分钟后会被封ip
private TimeLimiter _guestTimeConstraint = TimeLimiter.Compose(new CountByIntervalAwaitableConstraint(10, TimeSpan.FromMinutes(1)), new CountByIntervalAwaitableConstraint(1, TimeSpan.FromMilliseconds(5000)));
// 登录后最多1分钟20次请求,不然会触发机器人检验
diff --git a/Jellyfin.Plugin.MetaShark/Configuration/PluginConfiguration.cs b/Jellyfin.Plugin.MetaShark/Configuration/PluginConfiguration.cs
index 983a65c..06e9650 100644
--- a/Jellyfin.Plugin.MetaShark/Configuration/PluginConfiguration.cs
+++ b/Jellyfin.Plugin.MetaShark/Configuration/PluginConfiguration.cs
@@ -35,6 +35,8 @@ public class PluginConfiguration : BasePluginConfiguration
public bool EnableTmdbSearch { get; set; } = false;
+ public bool EnableTmdbBackdrop { get; set; } = false;
+
public string TmdbApiKey { get; set; } = string.Empty;
public string TmdbHost { get; set; } = string.Empty;
diff --git a/Jellyfin.Plugin.MetaShark/Configuration/configPage.html b/Jellyfin.Plugin.MetaShark/Configuration/configPage.html
index 064e6c8..a3214ea 100644
--- a/Jellyfin.Plugin.MetaShark/Configuration/configPage.html
+++ b/Jellyfin.Plugin.MetaShark/Configuration/configPage.html
@@ -69,6 +69,14 @@
勾选后,识别时会同时返回TheMovieDb搜索结果
+
+
+
勾选后,当影片在豆瓣找不到背景图时,改使用TheMovieDb的补全
+