diff --git a/Jellyfin.Plugin.Bangumi.Test/Person.cs b/Jellyfin.Plugin.Bangumi.Test/Person.cs index cc8d1cb..1d5ad50 100644 --- a/Jellyfin.Plugin.Bangumi.Test/Person.cs +++ b/Jellyfin.Plugin.Bangumi.Test/Person.cs @@ -2,6 +2,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; +using Jellyfin.Plugin.Bangumi.Configuration; using Jellyfin.Plugin.Bangumi.Providers; using Jellyfin.Plugin.Bangumi.Test.Util; using MediaBrowser.Controller.Providers; @@ -28,12 +29,14 @@ public void ProviderInfo() [TestMethod] public async Task GetById() { + Bangumi.Plugin.Instance!.Configuration.PersonTranslationPreference = TranslationPreferenceType.Chinese; var result = await _provider.GetMetadata(new PersonLookupInfo { - ProviderIds = new Dictionary { { Constants.ProviderName, "5847" } } + ProviderIds = new Dictionary { { Constants.ProviderName, "7307" } } }, _token); Assert.IsNotNull(result.Item, "person info should not be null"); - Assert.AreEqual("茅野愛衣", result.Item.Name, "should return correct name"); + Assert.AreEqual("上坂すみれ", result.Item.OriginalTitle, "should return correct name"); + Assert.AreEqual("上坂堇", result.Item.Name, "should return translated name"); Assert.IsNotNull(result.Item.ProviderIds[Constants.ProviderName], "should have plugin provider id"); } diff --git a/Jellyfin.Plugin.Bangumi.Test/Series.cs b/Jellyfin.Plugin.Bangumi.Test/Series.cs index 86f0563..04c089c 100644 --- a/Jellyfin.Plugin.Bangumi.Test/Series.cs +++ b/Jellyfin.Plugin.Bangumi.Test/Series.cs @@ -192,6 +192,7 @@ private static void AssertSeries(MetadataResult 0 and <= 10, "should return rating info"); + Assert.IsNotNull(result.Item.HomePageUrl, "should return official website link"); Assert.IsNotNull(result.People.Find(x => x.IsType(PersonKind.Actor)), "should have at least one actor"); Assert.IsNotNull(result.People.Find(x => x.IsType(PersonKind.Director)), "should have at least one director"); Assert.IsNotNull(result.People.Find(x => x.IsType(PersonKind.Writer)), "should have at least one writer"); diff --git a/Jellyfin.Plugin.Bangumi/Configuration/ConfigPage.html b/Jellyfin.Plugin.Bangumi/Configuration/ConfigPage.html index ce98b75..2099a27 100644 --- a/Jellyfin.Plugin.Bangumi/Configuration/ConfigPage.html +++ b/Jellyfin.Plugin.Bangumi/Configuration/ConfigPage.html @@ -195,6 +195,13 @@

元数据

+
+ + +