| | | 1 | | using System; |
| | | 2 | | using System.Collections.Generic; |
| | | 3 | | using System.Linq; |
| | | 4 | | using Jellyfin.Data.Enums; |
| | | 5 | | using Jellyfin.Database.Implementations; |
| | | 6 | | using Jellyfin.Database.Implementations.Entities; |
| | | 7 | | using Jellyfin.Extensions; |
| | | 8 | | using MediaBrowser.Controller.Entities; |
| | | 9 | | using MediaBrowser.Controller.Persistence; |
| | | 10 | | using MediaBrowser.Model.Querying; |
| | | 11 | | using Microsoft.EntityFrameworkCore; |
| | | 12 | | |
| | | 13 | | namespace Jellyfin.Server.Implementations.Item; |
| | | 14 | | #pragma warning disable RS0030 // Do not use banned APIs |
| | | 15 | | #pragma warning disable CA1304 // Specify CultureInfo |
| | | 16 | | #pragma warning disable CA1311 // Specify a culture or use an invariant version |
| | | 17 | | #pragma warning disable CA1862 // Use the 'StringComparison' method overloads to perform case-insensitive string compari |
| | | 18 | | |
| | | 19 | | /// <summary> |
| | | 20 | | /// Manager for handling people. |
| | | 21 | | /// </summary> |
| | | 22 | | /// <param name="dbProvider">Efcore Factory.</param> |
| | | 23 | | /// <param name="itemTypeLookup">Items lookup service.</param> |
| | | 24 | | /// <param name="queryHelpers">Shared item query helpers.</param> |
| | | 25 | | /// <remarks> |
| | | 26 | | /// Initializes a new instance of the <see cref="PeopleRepository"/> class. |
| | | 27 | | /// </remarks> |
| | | 28 | | public class PeopleRepository(IDbContextFactory<JellyfinDbContext> dbProvider, IItemTypeLookup itemTypeLookup, IItemQuer |
| | | 29 | | { |
| | 28 | 30 | | private readonly IDbContextFactory<JellyfinDbContext> _dbProvider = dbProvider; |
| | | 31 | | |
| | | 32 | | /// <inheritdoc/> |
| | | 33 | | public QueryResult<PersonInfo> GetPeople(InternalPeopleQuery filter) |
| | | 34 | | { |
| | 0 | 35 | | using var context = _dbProvider.CreateDbContext(); |
| | 0 | 36 | | var dbQuery = TranslateQuery(context.Peoples.AsNoTracking(), context, filter); |
| | 0 | 37 | | int? distinctNameCount = null; |
| | | 38 | | |
| | | 39 | | // Include PeopleBaseItemMap |
| | 0 | 40 | | if (!filter.ItemId.IsEmpty()) |
| | | 41 | | { |
| | 0 | 42 | | dbQuery = dbQuery.Include(p => p.BaseItems!.Where(m => m.ItemId == filter.ItemId)) |
| | 0 | 43 | | .OrderBy(e => e.BaseItems!.Where(m => m.ItemId == filter.ItemId).Min(m => m.ListOrder)) |
| | 0 | 44 | | .ThenBy(e => e.PersonType) |
| | 0 | 45 | | .ThenBy(e => e.Name); |
| | | 46 | | } |
| | | 47 | | else |
| | | 48 | | { |
| | | 49 | | // The Peoples table has one row per (Name, PersonType), so the same person can |
| | | 50 | | // appear multiple times (e.g. as Actor and GuestStar). Collapse to one row per |
| | | 51 | | // name so /Persons doesn't return the same BaseItem id repeatedly, keeping the |
| | | 52 | | // lowest id per lowercased name so case-only duplicates collapse together. |
| | 0 | 53 | | var candidates = dbQuery; |
| | 0 | 54 | | dbQuery = candidates |
| | 0 | 55 | | .Where(p => !candidates.Any(other => other.Name.ToLower() == p.Name.ToLower() && other.Id < p.Id)) |
| | 0 | 56 | | .OrderBy(e => e.Name.ToLower()); |
| | | 57 | | |
| | 0 | 58 | | if (filter.EnableTotalRecordCount) |
| | | 59 | | { |
| | 0 | 60 | | distinctNameCount = candidates.Select(e => e.Name.ToLower()).Distinct().Count(); |
| | | 61 | | } |
| | | 62 | | } |
| | | 63 | | |
| | 0 | 64 | | var count = 0; |
| | 0 | 65 | | if (filter.EnableTotalRecordCount) |
| | | 66 | | { |
| | 0 | 67 | | count = distinctNameCount ?? dbQuery.Count(); |
| | | 68 | | } |
| | | 69 | | |
| | 0 | 70 | | if (filter.StartIndex.HasValue && filter.StartIndex > 0) |
| | | 71 | | { |
| | 0 | 72 | | dbQuery = dbQuery.Skip(filter.StartIndex.Value); |
| | | 73 | | } |
| | | 74 | | |
| | 0 | 75 | | if (filter.Limit > 0) |
| | | 76 | | { |
| | 0 | 77 | | dbQuery = dbQuery.Take(filter.Limit); |
| | | 78 | | } |
| | | 79 | | |
| | 0 | 80 | | return new QueryResult<PersonInfo> |
| | 0 | 81 | | { |
| | 0 | 82 | | StartIndex = filter.StartIndex ?? 0, |
| | 0 | 83 | | TotalRecordCount = count, |
| | 0 | 84 | | Items = dbQuery.AsEnumerable().SelectMany(MapCredits).ToArray(), |
| | 0 | 85 | | }; |
| | 0 | 86 | | } |
| | | 87 | | |
| | | 88 | | /// <inheritdoc/> |
| | | 89 | | public IReadOnlyList<string> GetPeopleNames(InternalPeopleQuery filter) |
| | | 90 | | { |
| | 0 | 91 | | using var context = _dbProvider.CreateDbContext(); |
| | | 92 | | |
| | 0 | 93 | | IQueryable<string> dbQuery = TranslateQuery(context.Peoples.AsNoTracking(), context, filter) |
| | 0 | 94 | | .Select(e => e.Name) |
| | 0 | 95 | | .Distinct() |
| | 0 | 96 | | .OrderBy(e => e); |
| | | 97 | | |
| | 0 | 98 | | if (filter.StartIndex.HasValue && filter.StartIndex > 0) |
| | | 99 | | { |
| | 0 | 100 | | dbQuery = dbQuery.Skip(filter.StartIndex.Value); |
| | | 101 | | } |
| | | 102 | | |
| | 0 | 103 | | if (filter.Limit > 0) |
| | | 104 | | { |
| | 0 | 105 | | dbQuery = dbQuery.Take(filter.Limit); |
| | | 106 | | } |
| | | 107 | | |
| | 0 | 108 | | return dbQuery.ToArray(); |
| | 0 | 109 | | } |
| | | 110 | | |
| | | 111 | | /// <inheritdoc /> |
| | | 112 | | public void UpdatePeople(Guid itemId, IReadOnlyList<PersonInfo> people) |
| | | 113 | | { |
| | 48 | 114 | | foreach (var person in people) |
| | | 115 | | { |
| | 15 | 116 | | person.Name = person.Name.Trim(); |
| | 15 | 117 | | person.Role = person.Role?.Trim() ?? string.Empty; |
| | | 118 | | } |
| | | 119 | | |
| | | 120 | | // Project the values every comparison below needs once, so neither the case folding nor the |
| | | 121 | | // enum formatting is repeated per candidate. |
| | 9 | 122 | | var credits = people.Select(e => (Person: e, LoweredName: e.Name.ToLowerInvariant(), PersonType: e.Type.ToString |
| | | 123 | | |
| | | 124 | | // multiple metadata providers can provide the _same_ credit; dedupe case-insensitively. |
| | | 125 | | // The role is part of the key because one person can hold several credits of the same type |
| | | 126 | | // on an item, e.g. a Writer credited for both the Novel and the Screenplay. |
| | 9 | 127 | | var distinctCredits = credits.DistinctBy(e => (e.LoweredName, e.PersonType, e.LoweredRole)).ToArray(); |
| | | 128 | | |
| | 9 | 129 | | var distinctPersons = distinctCredits.DistinctBy(e => (e.LoweredName, e.PersonType)).ToArray(); |
| | 9 | 130 | | var personKeys = distinctPersons.Select(e => e.LoweredName + "-" + e.PersonType).ToArray(); |
| | | 131 | | |
| | 9 | 132 | | using var context = _dbProvider.CreateDbContext(); |
| | 9 | 133 | | using var transaction = context.Database.BeginTransaction(); |
| | 9 | 134 | | var existingPersons = context.Peoples.Select(e => new |
| | 9 | 135 | | { |
| | 9 | 136 | | item = e, |
| | 9 | 137 | | SelectionKey = e.Name.ToLower() + "-" + e.PersonType |
| | 9 | 138 | | }) |
| | 9 | 139 | | .Where(p => personKeys.Contains(p.SelectionKey)) |
| | 9 | 140 | | .Select(f => f.item) |
| | 9 | 141 | | .ToArray(); |
| | | 142 | | |
| | 9 | 143 | | var existingPersonKeys = existingPersons.Select(e => (e.Name.ToLowerInvariant(), e.PersonType ?? string.Empty)). |
| | | 144 | | |
| | 9 | 145 | | var toAdd = distinctPersons |
| | 9 | 146 | | .Where(e => !existingPersonKeys.Contains((e.LoweredName, e.PersonType))) |
| | 9 | 147 | | .Select(e => Map(e.Person)) |
| | 9 | 148 | | .ToArray(); |
| | 9 | 149 | | context.Peoples.AddRange(toAdd); |
| | 9 | 150 | | context.SaveChanges(); |
| | | 151 | | |
| | | 152 | | // The Peoples table can hold case-only duplicates, so keep the first match per key just as |
| | | 153 | | // the previous First() lookup did. |
| | 9 | 154 | | var personsEntities = new Dictionary<(string LoweredName, string PersonType), People>(); |
| | 42 | 155 | | foreach (var entity in toAdd.Concat(existingPersons)) |
| | | 156 | | { |
| | 12 | 157 | | personsEntities.TryAdd((entity.Name.ToLowerInvariant(), entity.PersonType ?? string.Empty), entity); |
| | | 158 | | } |
| | | 159 | | |
| | 9 | 160 | | var existingMaps = context.PeopleBaseItemMap.Include(e => e.People).Where(e => e.ItemId == itemId).ToList(); |
| | 9 | 161 | | var existingMapsByCredit = new Dictionary<(string LoweredName, string PersonType, string LoweredRole), PeopleBas |
| | 28 | 162 | | foreach (var map in existingMaps) |
| | | 163 | | { |
| | 5 | 164 | | existingMapsByCredit.TryAdd((map.People.Name.ToLowerInvariant(), map.People.PersonType ?? string.Empty, map. |
| | | 165 | | } |
| | | 166 | | |
| | 9 | 167 | | var listOrder = 0; |
| | | 168 | | |
| | 46 | 169 | | foreach (var credit in distinctCredits) |
| | | 170 | | { |
| | 14 | 171 | | var entityPerson = personsEntities[(credit.LoweredName, credit.PersonType)]; |
| | 14 | 172 | | if (existingMapsByCredit.TryGetValue((credit.LoweredName, credit.PersonType, credit.LoweredRole), out var ex |
| | | 173 | | { |
| | | 174 | | // Update the order for existing mappings |
| | 4 | 175 | | existingMap.ListOrder = listOrder; |
| | 4 | 176 | | existingMap.SortOrder = credit.Person.SortOrder; |
| | | 177 | | // person mapping already exists so remove from list |
| | 4 | 178 | | existingMaps.Remove(existingMap); |
| | | 179 | | } |
| | | 180 | | else |
| | | 181 | | { |
| | 10 | 182 | | context.PeopleBaseItemMap.Add(new PeopleBaseItemMap() |
| | 10 | 183 | | { |
| | 10 | 184 | | Item = null!, |
| | 10 | 185 | | ItemId = itemId, |
| | 10 | 186 | | People = null!, |
| | 10 | 187 | | PeopleId = entityPerson.Id, |
| | 10 | 188 | | ListOrder = listOrder, |
| | 10 | 189 | | SortOrder = credit.Person.SortOrder, |
| | 10 | 190 | | Role = credit.Person.Role |
| | 10 | 191 | | }); |
| | | 192 | | } |
| | | 193 | | |
| | 14 | 194 | | listOrder++; |
| | | 195 | | } |
| | | 196 | | |
| | 9 | 197 | | context.PeopleBaseItemMap.RemoveRange(existingMaps); |
| | | 198 | | |
| | 9 | 199 | | context.SaveChanges(); |
| | 9 | 200 | | transaction.Commit(); |
| | 18 | 201 | | } |
| | | 202 | | |
| | | 203 | | /// <inheritdoc/> |
| | | 204 | | public IReadOnlyDictionary<Guid, IReadOnlyList<string>> GetPeopleNamesByItems(IReadOnlyList<Guid> itemIds, IReadOnly |
| | | 205 | | { |
| | 0 | 206 | | using var context = _dbProvider.CreateDbContext(); |
| | 0 | 207 | | var query = context.PeopleBaseItemMap |
| | 0 | 208 | | .AsNoTracking() |
| | 0 | 209 | | .Where(m => itemIds.Contains(m.ItemId)); |
| | | 210 | | |
| | 0 | 211 | | if (personTypes.Count > 0) |
| | | 212 | | { |
| | 0 | 213 | | query = query.Where(m => personTypes.Contains(m.People.PersonType)); |
| | | 214 | | } |
| | | 215 | | |
| | 0 | 216 | | var rows = query |
| | 0 | 217 | | .OrderBy(m => m.ListOrder) |
| | 0 | 218 | | .Select(m => new { m.ItemId, m.People.Name }) |
| | 0 | 219 | | .ToList(); |
| | | 220 | | |
| | 0 | 221 | | var result = new Dictionary<Guid, IReadOnlyList<string>>(); |
| | 0 | 222 | | foreach (var group in rows.GroupBy(r => r.ItemId)) |
| | | 223 | | { |
| | 0 | 224 | | var names = group |
| | 0 | 225 | | .Select(r => r.Name) |
| | 0 | 226 | | .Where(name => !string.IsNullOrEmpty(name)) |
| | 0 | 227 | | .Distinct() |
| | 0 | 228 | | .ToArray(); |
| | | 229 | | |
| | 0 | 230 | | if (names.Length > 0) |
| | | 231 | | { |
| | 0 | 232 | | result[group.Key] = names; |
| | | 233 | | } |
| | | 234 | | } |
| | | 235 | | |
| | 0 | 236 | | return result; |
| | 0 | 237 | | } |
| | | 238 | | |
| | | 239 | | /// <inheritdoc/> |
| | | 240 | | public IReadOnlyDictionary<Guid, IReadOnlyList<PersonInfo>> GetPeopleByItems(IReadOnlyList<Guid> itemIds) |
| | | 241 | | { |
| | 0 | 242 | | using var context = _dbProvider.CreateDbContext(); |
| | 0 | 243 | | var rows = context.PeopleBaseItemMap |
| | 0 | 244 | | .AsNoTracking() |
| | 0 | 245 | | .Where(m => itemIds.Contains(m.ItemId)) |
| | 0 | 246 | | .OrderBy(m => m.ListOrder) |
| | 0 | 247 | | .Select(m => new |
| | 0 | 248 | | { |
| | 0 | 249 | | m.ItemId, |
| | 0 | 250 | | m.Role, |
| | 0 | 251 | | m.SortOrder, |
| | 0 | 252 | | m.People.Id, |
| | 0 | 253 | | m.People.Name, |
| | 0 | 254 | | m.People.PersonType |
| | 0 | 255 | | }) |
| | 0 | 256 | | .ToList(); |
| | | 257 | | |
| | 0 | 258 | | var result = new Dictionary<Guid, IReadOnlyList<PersonInfo>>(); |
| | 0 | 259 | | foreach (var group in rows.GroupBy(r => r.ItemId)) |
| | | 260 | | { |
| | 0 | 261 | | var people = new List<PersonInfo>(); |
| | 0 | 262 | | foreach (var row in group) |
| | | 263 | | { |
| | 0 | 264 | | var personInfo = new PersonInfo |
| | 0 | 265 | | { |
| | 0 | 266 | | ItemId = row.ItemId, |
| | 0 | 267 | | Id = row.Id, |
| | 0 | 268 | | Name = row.Name, |
| | 0 | 269 | | Role = row.Role, |
| | 0 | 270 | | SortOrder = row.SortOrder |
| | 0 | 271 | | }; |
| | 0 | 272 | | if (Enum.TryParse<PersonKind>(row.PersonType, out var kind)) |
| | | 273 | | { |
| | 0 | 274 | | personInfo.Type = kind; |
| | | 275 | | } |
| | | 276 | | |
| | 0 | 277 | | people.Add(personInfo); |
| | | 278 | | } |
| | | 279 | | |
| | 0 | 280 | | result[group.Key] = people; |
| | | 281 | | } |
| | | 282 | | |
| | 0 | 283 | | return result; |
| | 0 | 284 | | } |
| | | 285 | | |
| | | 286 | | private IEnumerable<PersonInfo> MapCredits(People people) |
| | | 287 | | { |
| | 0 | 288 | | var mappings = people.BaseItems; |
| | 0 | 289 | | if (mappings is null || mappings.Count == 0) |
| | | 290 | | { |
| | 0 | 291 | | return [Map(people, null)]; |
| | | 292 | | } |
| | | 293 | | |
| | 0 | 294 | | return mappings.OrderBy(m => m.ListOrder).Select(m => Map(people, m)); |
| | | 295 | | } |
| | | 296 | | |
| | | 297 | | private PersonInfo Map(People people, PeopleBaseItemMap? mapping) |
| | | 298 | | { |
| | 0 | 299 | | var personInfo = new PersonInfo() |
| | 0 | 300 | | { |
| | 0 | 301 | | Id = people.Id, |
| | 0 | 302 | | Name = people.Name, |
| | 0 | 303 | | Role = mapping?.Role, |
| | 0 | 304 | | SortOrder = mapping?.SortOrder |
| | 0 | 305 | | }; |
| | 0 | 306 | | if (Enum.TryParse<PersonKind>(people.PersonType, out var kind)) |
| | | 307 | | { |
| | 0 | 308 | | personInfo.Type = kind; |
| | | 309 | | } |
| | | 310 | | |
| | 0 | 311 | | return personInfo; |
| | | 312 | | } |
| | | 313 | | |
| | | 314 | | private People Map(PersonInfo people) |
| | | 315 | | { |
| | 8 | 316 | | var personInfo = new People() |
| | 8 | 317 | | { |
| | 8 | 318 | | Name = people.Name, |
| | 8 | 319 | | PersonType = people.Type.ToString(), |
| | 8 | 320 | | Id = people.Id, |
| | 8 | 321 | | }; |
| | | 322 | | |
| | 8 | 323 | | return personInfo; |
| | | 324 | | } |
| | | 325 | | |
| | | 326 | | private IQueryable<People> TranslateQuery(IQueryable<People> query, JellyfinDbContext context, InternalPeopleQuery f |
| | | 327 | | { |
| | 0 | 328 | | if (filter.User is not null && filter.IsFavorite.HasValue) |
| | | 329 | | { |
| | 0 | 330 | | var personType = itemTypeLookup.BaseItemKindNames[BaseItemKind.Person]; |
| | 0 | 331 | | var userId = filter.User.Id; |
| | 0 | 332 | | var isFavorite = filter.IsFavorite.Value; |
| | 0 | 333 | | var favoriteItemIds = context.UserData |
| | 0 | 334 | | .Where(u => u.UserId.Equals(userId) && u.IsFavorite == isFavorite) |
| | 0 | 335 | | .Select(u => u.ItemId); |
| | | 336 | | |
| | 0 | 337 | | var favoriteNames = context.BaseItems |
| | 0 | 338 | | .Where(b => b.Type == personType && favoriteItemIds.Contains(b.Id)) |
| | 0 | 339 | | .Select(b => b.Name); |
| | | 340 | | |
| | 0 | 341 | | query = query.Where(e => favoriteNames.Contains(e.Name)); |
| | | 342 | | } |
| | | 343 | | |
| | 0 | 344 | | if (filter.AccessFilter is not null) |
| | | 345 | | { |
| | | 346 | | // Keep only people credited on at least one item the user can see. |
| | 0 | 347 | | var accessibleItems = queryHelpers.ApplyAccessFiltering(context, context.BaseItems.AsNoTracking(), filter.Ac |
| | 0 | 348 | | query = query.Where(e => context.PeopleBaseItemMap |
| | 0 | 349 | | .Any(m => m.PeopleId == e.Id && accessibleItems.Any(i => i.Id == m.ItemId))); |
| | | 350 | | } |
| | | 351 | | |
| | 0 | 352 | | if (!filter.ItemId.IsEmpty()) |
| | | 353 | | { |
| | 0 | 354 | | query = query.Where(e => e.BaseItems!.Any(w => w.ItemId.Equals(filter.ItemId))); |
| | | 355 | | } |
| | | 356 | | |
| | 0 | 357 | | if (filter.ParentId != null) |
| | | 358 | | { |
| | 0 | 359 | | query = query.Where(e => e.BaseItems!.Any(w => context.AncestorIds.Any(i => i.ParentItemId == filter.ParentI |
| | | 360 | | } |
| | | 361 | | |
| | 0 | 362 | | if (!filter.AppearsInItemId.IsEmpty()) |
| | | 363 | | { |
| | 0 | 364 | | query = query.Where(e => e.BaseItems!.Any(w => w.ItemId.Equals(filter.AppearsInItemId))); |
| | | 365 | | } |
| | | 366 | | |
| | 0 | 367 | | var queryPersonTypes = filter.PersonTypes.Where(IsValidPersonType).ToList(); |
| | 0 | 368 | | if (queryPersonTypes.Count > 0) |
| | | 369 | | { |
| | 0 | 370 | | query = query.Where(e => queryPersonTypes.Contains(e.PersonType)); |
| | | 371 | | } |
| | | 372 | | |
| | 0 | 373 | | var queryExcludePersonTypes = filter.ExcludePersonTypes.Where(IsValidPersonType).ToList(); |
| | | 374 | | |
| | 0 | 375 | | if (queryExcludePersonTypes.Count > 0) |
| | | 376 | | { |
| | 0 | 377 | | query = query.Where(e => !queryExcludePersonTypes.Contains(e.PersonType)); |
| | | 378 | | } |
| | | 379 | | |
| | 0 | 380 | | if (filter.MaxListOrder.HasValue && !filter.ItemId.IsEmpty()) |
| | | 381 | | { |
| | 0 | 382 | | query = query.Where(e => e.BaseItems!.Any(w => w.ItemId == filter.ItemId && w.ListOrder <= filter.MaxListOrd |
| | | 383 | | } |
| | | 384 | | |
| | 0 | 385 | | if (!string.IsNullOrWhiteSpace(filter.NameContains)) |
| | | 386 | | { |
| | 0 | 387 | | var nameContainsUpper = filter.NameContains.ToUpper(); |
| | 0 | 388 | | query = query.Where(e => e.Name.ToUpper().Contains(nameContainsUpper)); |
| | | 389 | | } |
| | | 390 | | |
| | 0 | 391 | | if (!string.IsNullOrWhiteSpace(filter.NameStartsWith)) |
| | | 392 | | { |
| | 0 | 393 | | query = query.Where(e => e.Name.StartsWith(filter.NameStartsWith.ToLowerInvariant())); |
| | | 394 | | } |
| | | 395 | | |
| | 0 | 396 | | if (!string.IsNullOrWhiteSpace(filter.NameLessThan)) |
| | | 397 | | { |
| | 0 | 398 | | query = query.Where(e => e.Name.CompareTo(filter.NameLessThan.ToLowerInvariant()) < 0); |
| | | 399 | | } |
| | | 400 | | |
| | 0 | 401 | | if (!string.IsNullOrWhiteSpace(filter.NameStartsWithOrGreater)) |
| | | 402 | | { |
| | 0 | 403 | | query = query.Where(e => e.Name.CompareTo(filter.NameStartsWithOrGreater.ToLowerInvariant()) >= 0); |
| | | 404 | | } |
| | | 405 | | |
| | 0 | 406 | | return query; |
| | | 407 | | } |
| | | 408 | | |
| | | 409 | | private bool IsAlphaNumeric(string str) |
| | | 410 | | { |
| | 0 | 411 | | if (string.IsNullOrWhiteSpace(str)) |
| | | 412 | | { |
| | 0 | 413 | | return false; |
| | | 414 | | } |
| | | 415 | | |
| | 0 | 416 | | for (int i = 0; i < str.Length; i++) |
| | | 417 | | { |
| | 0 | 418 | | if (!char.IsLetter(str[i]) && !char.IsNumber(str[i])) |
| | | 419 | | { |
| | 0 | 420 | | return false; |
| | | 421 | | } |
| | | 422 | | } |
| | | 423 | | |
| | 0 | 424 | | return true; |
| | | 425 | | } |
| | | 426 | | |
| | | 427 | | private bool IsValidPersonType(string value) |
| | | 428 | | { |
| | 0 | 429 | | return IsAlphaNumeric(value); |
| | | 430 | | } |
| | | 431 | | } |