Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Fixed missing parameters in querystring for GetSearchHintsAsync method #42

Merged
merged 1 commit into from
May 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,4 @@ pip-log.txt

#Mr Developer
.mr.developer.cfg
/.vs
11 changes: 11 additions & 0 deletions Emby.ApiClient/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1573,6 +1573,7 @@ public async Task<SearchHintResult> GetSearchHintsAsync(SearchQuery query)

queryString.AddIfNotNullOrEmpty("SearchTerm", query.SearchTerm);
queryString.AddIfNotNullOrEmpty("UserId", query.UserId);
queryString.AddIfNotNullOrEmpty("ParentId", query.ParentId);
queryString.AddIfNotNull("StartIndex", query.StartIndex);
queryString.AddIfNotNull("Limit", query.Limit);

Expand All @@ -1582,6 +1583,16 @@ public async Task<SearchHintResult> GetSearchHintsAsync(SearchQuery query)
queryString.Add("IncludePeople", query.IncludePeople);
queryString.Add("IncludeStudios", query.IncludeStudios);

queryString.AddIfNotNull("ExcludeItemTypes", query.ExcludeItemTypes);
queryString.AddIfNotNull("IncludeItemTypes", query.IncludeItemTypes);

queryString.AddIfNotNull("IsKids", query.IsKids);
queryString.AddIfNotNull("IsMovie", query.IsMovie);
queryString.AddIfNotNull("IsNews", query.IsNews);
queryString.AddIfNotNull("IsSeries", query.IsSeries);
queryString.AddIfNotNull("IsSports", query.IsSports);
queryString.AddIfNotNull("MediaTypes", query.MediaTypes);

var url = GetApiUrl("Search/Hints", queryString);

using (var stream = await GetSerializedStreamAsync(url).ConfigureAwait(false))
Expand Down