Fix variety show actor list
This commit is contained in:
parent
996a6a14d1
commit
b3792761c4
|
@ -31,7 +31,7 @@ namespace Jellyfin.Plugin.MetaShark.Test
|
|||
[TestMethod]
|
||||
public void TestGetMetadata()
|
||||
{
|
||||
var info = new SeriesInfo() { Name = "外科医生奉达熙", ProviderIds = new Dictionary<string, string>() { { BaseProvider.DoubanProviderId, "2241528" } } };
|
||||
var info = new SeriesInfo() { Name = "奔跑吧兄弟" };
|
||||
var doubanApi = new DoubanApi(loggerFactory);
|
||||
var tmdbApi = new TmdbApi(loggerFactory);
|
||||
var omdbApi = new OmdbApi(loggerFactory);
|
||||
|
|
|
@ -450,11 +450,6 @@ namespace Jellyfin.Plugin.MetaShark.Api
|
|||
celebrityRole = celebrityRoleType;
|
||||
}
|
||||
|
||||
if (celebrityRoleType != "导演" && celebrityRoleType != "配音" && celebrityRoleType != "演员")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var celebrity = new DoubanCelebrity();
|
||||
celebrity.Id = celebrityId;
|
||||
celebrity.Name = celebrityName;
|
||||
|
|
|
@ -132,10 +132,10 @@ namespace Jellyfin.Plugin.MetaShark.Model
|
|||
{
|
||||
if (string.IsNullOrEmpty(this._roleType))
|
||||
{
|
||||
return this.Role.Equals("导演", StringComparison.Ordinal) ? MediaBrowser.Model.Entities.PersonType.Director : MediaBrowser.Model.Entities.PersonType.Actor;
|
||||
return this.Role.Contains("导演", StringComparison.Ordinal) ? MediaBrowser.Model.Entities.PersonType.Director : MediaBrowser.Model.Entities.PersonType.Actor;
|
||||
}
|
||||
|
||||
return this._roleType.Equals("导演", StringComparison.Ordinal) ? MediaBrowser.Model.Entities.PersonType.Director : MediaBrowser.Model.Entities.PersonType.Actor;
|
||||
return this._roleType.Contains("导演", StringComparison.Ordinal) ? MediaBrowser.Model.Entities.PersonType.Director : MediaBrowser.Model.Entities.PersonType.Actor;
|
||||
}
|
||||
set
|
||||
{
|
||||
|
|
|
@ -51,6 +51,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
protected readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
protected Regex regMetaSourcePrefix = new Regex(@"^\[.+\]", RegexOptions.Compiled);
|
||||
protected Regex regSeasonNameSuffix = new Regex(@"\s第.季$", RegexOptions.Compiled);
|
||||
|
||||
protected PluginConfiguration config
|
||||
{
|
||||
|
@ -399,5 +400,10 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
|
||||
return Path.GetFileNameWithoutExtension(info.Path) ?? info.Name;
|
||||
}
|
||||
|
||||
protected string RemoveSeasonSubfix(string name)
|
||||
{
|
||||
return regSeasonNameSuffix.Replace(name, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ namespace Jellyfin.Plugin.MetaShark.Providers
|
|||
var item = new Series
|
||||
{
|
||||
ProviderIds = new Dictionary<string, string> { { DoubanProviderId, subject.Sid }, { Plugin.ProviderId, MetaSource.Douban } },
|
||||
Name = subject.Name,
|
||||
Name = RemoveSeasonSubfix(subject.Name),
|
||||
OriginalTitle = subject.OriginalName,
|
||||
CommunityRating = subject.Rating,
|
||||
Overview = subject.Intro,
|
||||
|
|
Loading…
Reference in New Issue