diff --git a/components/search/SearchRow.brs b/components/search/SearchRow.brs index ffbe0920d..7083513b8 100644 --- a/components/search/SearchRow.brs +++ b/components/search/SearchRow.brs @@ -65,7 +65,7 @@ function getData() "PlaylistsFolder": { "label": "Playlist", "count": 0 } } - for each item in itemData.searchHints + for each item in itemData.Items if content_types[item.type] <> invalid content_types[item.type].count += 1 end if @@ -86,10 +86,9 @@ sub addRow(data, title, type_filter) itemData = m.top.itemData row = data.CreateChild("ContentNode") row.title = title - for each item in itemData.SearchHints + for each item in itemData.Items if item.type = type_filter row.appendChild(item) end if end for end sub - diff --git a/source/api/Items.brs b/source/api/Items.brs index 699c8de6d..2026681e1 100644 --- a/source/api/Items.brs +++ b/source/api/Items.brs @@ -41,7 +41,7 @@ function searchMedia(query as string) ' For each potential type, a separate query is done: ' varying item types, and artists, and people if query <> "" - resp = APIRequest(Substitute("Search/Hints", m.global.session.user.id), { + resp = APIRequest(Substitute("Users/{0}/Items", m.global.session.user.id), { "searchTerm": query, "IncludePeople": true, "IncludeMedia": true, @@ -58,13 +58,13 @@ function searchMedia(query as string) data = getJson(resp) results = [] - for each item in data.SearchHints + for each item in data.Items tmp = CreateObject("roSGNode", "SearchData") tmp.image = PosterImage(item.id) tmp.json = item results.push(tmp) end for - data.SearchHints = results + data.Items = results return data end if return []