mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 01:24:44 +01:00
search ignore accent chars
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Entities.TV;
|
||||
using MediaBrowser.Controller.Library;
|
||||
@@ -97,6 +98,8 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
throw new ArgumentNullException("searchTerm");
|
||||
}
|
||||
|
||||
searchTerm = searchTerm.RemoveDiacritics();
|
||||
|
||||
var terms = GetWords(searchTerm);
|
||||
|
||||
var hints = new List<Tuple<BaseItem, string, int>>();
|
||||
@@ -318,6 +321,8 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
throw new ArgumentNullException("input");
|
||||
}
|
||||
|
||||
input = input.RemoveDiacritics();
|
||||
|
||||
if (string.Equals(input, searchInput, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return new Tuple<string, int>(searchInput, 0);
|
||||
|
||||
Reference in New Issue
Block a user