aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-03-06 00:17:28 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-03-06 00:17:28 -0500
commitf69151fc425dfb4b31721c39eef4c8faf0a80e72 (patch)
tree031f52d1de316755fbf44b1be9deec04811df363 /MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs
parent2349c8099d04c6c0631cd33e6c74b404381946ab (diff)
parentaea62df07f9bd70ff79c2fbced1a658b7b4667d8 (diff)
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs')
-rw-r--r--MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs
index 5c2c9967e..12b3fd015 100644
--- a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs
+++ b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs
@@ -174,6 +174,10 @@ namespace MediaBrowser.Api.UserLibrary
{
items = items.Where(i => string.Compare(request.NameStartsWithOrGreater, i.SortName, StringComparison.CurrentCultureIgnoreCase) < 1);
}
+ if (!string.IsNullOrEmpty(request.NameStartsWith))
+ {
+ items = items.Where(i => string.Compare(request.NameStartsWith, i.SortName.Substring(0, 1), StringComparison.CurrentCultureIgnoreCase) == 0);
+ }
if (!string.IsNullOrEmpty(request.NameLessThan))
{
@@ -313,6 +317,9 @@ namespace MediaBrowser.Api.UserLibrary
[ApiMember(Name = "NameStartsWithOrGreater", Description = "Optional filter by items whose name is sorted equally or greater than a given input string.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public string NameStartsWithOrGreater { get; set; }
+ [ApiMember(Name = "NameStartsWith", Description = "Optional filter by items whose name is sorted equally than a given input string.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
+ public string NameStartsWith { get; set; }
+
[ApiMember(Name = "NameLessThan", Description = "Optional filter by items whose name is sorted less than a given input string.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public string NameLessThan { get; set; }