Update API docs

This commit is contained in:
jellyfin-bot 2023-10-29 22:25:19 +00:00
parent 942a809cd2
commit c284a3516c
3 changed files with 6 additions and 11 deletions

View File

@ -137,7 +137,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
@ -158,13 +158,12 @@ 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
</pre>
</article>
</section>

File diff suppressed because one or more lines are too long

View File

@ -109,11 +109,8 @@ end function
' 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,
@ -128,15 +125,14 @@ function searchMedia(query as string)
"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 []