diff options
| author | Bond-009 <bond.009@outlook.com> | 2026-02-05 17:45:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-05 17:45:45 +0100 |
| commit | e4619556ba948c40276d75b7726718543fc867ce (patch) | |
| tree | 6c3d6882fd2270203fa319c7879c666e2d9330d1 | |
| parent | 9f2dc178f57ab4f59d6160efb8d816fdd81382be (diff) | |
| parent | 4c751e0a86d805314023b8a750e675f5131ee613 (diff) | |
Merge pull request #16181 from theguymadmax/trim-people
Trim names and roles for people
| -rw-r--r-- | Jellyfin.Server.Implementations/Item/PeopleRepository.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Jellyfin.Server.Implementations/Item/PeopleRepository.cs b/Jellyfin.Server.Implementations/Item/PeopleRepository.cs index 355ed64797..e2569241d2 100644 --- a/Jellyfin.Server.Implementations/Item/PeopleRepository.cs +++ b/Jellyfin.Server.Implementations/Item/PeopleRepository.cs @@ -74,9 +74,10 @@ public class PeopleRepository(IDbContextFactory<JellyfinDbContext> dbProvider, I /// <inheritdoc /> public void UpdatePeople(Guid itemId, IReadOnlyList<PersonInfo> people) { - foreach (var item in people.Where(e => e.Role is null)) + foreach (var person in people) { - item.Role = string.Empty; + person.Name = person.Name.Trim(); + person.Role = person.Role?.Trim() ?? string.Empty; } // multiple metadata providers can provide the _same_ person |
