Skip to content

Commit

Permalink
Update API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jellyfin-bot committed Oct 29, 2023
1 parent 942a809 commit c284a35
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
5 changes: 2 additions & 3 deletions docs/api/components_search_SearchRow.brs.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h1 class="page-title">Source: components/search/SearchRow.brs</h1>
"PlaylistsFolder": { "label": "Playlist", "count": 0 }
}

for each item in itemData.searchHints
for each item in itemData.Items
if content_types[item.type] &lt;> invalid
content_types[item.type].count += 1
end if
Expand All @@ -158,13 +158,12 @@ <h1 class="page-title">Source: components/search/SearchRow.brs</h1>
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

</pre>
</article>
</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/quicksearch.html

Large diffs are not rendered by default.

10 changes: 3 additions & 7 deletions docs/api/source_api_Items.brs.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,8 @@ <h1 class="page-title">Source: source/api/Items.brs</h1>

' Search across all libraries
function searchMedia(query as string)
' This appears to be done differently on the web now
' For each potential type, a separate query is done:
' varying item types, and artists, and people
if query &lt;> ""
resp = APIRequest(Substitute("Search/Hints", m.global.session.user.id), {
data = api.users.GetItemsByQuery(m.global.session.user.id, {
"searchTerm": query,
"IncludePeople": true,
"IncludeMedia": true,
Expand All @@ -128,15 +125,14 @@ <h1 class="page-title">Source: source/api/Items.brs</h1>
"limit": 100
})

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 []
Expand Down

0 comments on commit c284a35

Please sign in to comment.