mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			619 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			619 B
		
	
	
	
		
			C#
		
	
	
	
	
	
#pragma warning disable CS1591
 | 
						|
 | 
						|
using System;
 | 
						|
using System.Collections.Generic;
 | 
						|
using System.Linq;
 | 
						|
using Jellyfin.Extensions;
 | 
						|
 | 
						|
namespace MediaBrowser.Controller.Library
 | 
						|
{
 | 
						|
    public static class NameExtensions
 | 
						|
    {
 | 
						|
        public static IEnumerable<string> DistinctNames(this IEnumerable<string> names)
 | 
						|
            => names.DistinctBy(RemoveDiacritics, StringComparer.OrdinalIgnoreCase);
 | 
						|
 | 
						|
        private static string RemoveDiacritics(string? name)
 | 
						|
        {
 | 
						|
            if (name is null)
 | 
						|
            {
 | 
						|
                return string.Empty;
 | 
						|
            }
 | 
						|
 | 
						|
            return name.RemoveDiacritics();
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |