mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-24 01:28:27 +01:00
Convert Person.Type to use PersonKind enum (#9487)
This commit is contained in:
@@ -2032,7 +2032,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
var people = item.Id.Equals(default) ? new List<PersonInfo>() : _libraryManager.GetPeople(item);
|
||||
|
||||
var directors = people
|
||||
.Where(i => IsPersonType(i, PersonType.Director))
|
||||
.Where(i => i.IsType(PersonKind.Director))
|
||||
.Select(i => i.Name)
|
||||
.ToList();
|
||||
|
||||
@@ -2042,7 +2042,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
}
|
||||
|
||||
var writers = people
|
||||
.Where(i => IsPersonType(i, PersonType.Writer))
|
||||
.Where(i => i.IsType(PersonKind.Writer))
|
||||
.Select(i => i.Name)
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
@@ -2122,10 +2122,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
}
|
||||
}
|
||||
|
||||
private static bool IsPersonType(PersonInfo person, string type)
|
||||
=> string.Equals(person.Type, type, StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(person.Role, type, StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
private LiveTvProgram GetProgramInfoFromCache(string programId)
|
||||
{
|
||||
var query = new InternalItemsQuery
|
||||
|
||||
Reference in New Issue
Block a user