mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 17:44:43 +01:00
add dish hopper profile
This commit is contained in:
@@ -355,7 +355,22 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
/// <returns>System.String[][].</returns>
|
||||
private List<string> GetWords(string term)
|
||||
{
|
||||
return term.Split().Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
|
||||
var stoplist = GetStopList().ToList();
|
||||
|
||||
return term.Split()
|
||||
.Where(i => !string.IsNullOrWhiteSpace(i) && !stoplist.Contains(i, StringComparer.OrdinalIgnoreCase))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
private IEnumerable<string> GetStopList()
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
"the",
|
||||
"a",
|
||||
"of",
|
||||
"an"
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user