mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-19 11:59:02 -07:00
27 lines
673 B
C#
27 lines
673 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using MediaBrowser.Controller.Extensions;
|
|
using MediaBrowser.Model.Extensions;
|
|
|
|
namespace MediaBrowser.Controller.Library
|
|
{
|
|
public static class NameExtensions
|
|
{
|
|
private static string RemoveDiacritics(string name)
|
|
{
|
|
if (name == null)
|
|
{
|
|
return string.Empty;
|
|
}
|
|
|
|
//return name;
|
|
return name.RemoveDiacritics();
|
|
}
|
|
|
|
public static IEnumerable<string> DistinctNames(this IEnumerable<string> names)
|
|
{
|
|
return names.DistinctBy(RemoveDiacritics, StringComparer.OrdinalIgnoreCase);
|
|
}
|
|
}
|
|
}
|