mirror of
https://github.com/jellyfin/jellyfin-roku.git
synced 2024-12-03 11:50:56 +00:00
Merge pull request #166 from neilsb/handle-displaying-userviews
Handle display of UserView libraries
This commit is contained in:
commit
ee6cd0491c
@ -15,7 +15,7 @@ sub setData()
|
||||
|
||||
' Set appropriate Images for Wide and Tall based on type
|
||||
|
||||
if datum.type = "CollectionFolder" then
|
||||
if datum.type = "CollectionFolder" OR datum.type = "UserView" then
|
||||
params = { "Tag" : datum.ImageTags.Primary, "maxHeight" : 261, "maxWidth" : 464 }
|
||||
m.top.thumbnailURL = ImageURL(datum.id, "Primary", params)
|
||||
m.top.widePosterUrl = m.top.thumbnailURL
|
||||
|
@ -22,7 +22,7 @@ sub itemContentChanged()
|
||||
|
||||
' Format the Data based on the type of Home Data
|
||||
|
||||
if itemData.type = "CollectionFolder" then
|
||||
if itemData.type = "CollectionFolder" OR itemData.type = "UserView" then
|
||||
itemText.text = itemData.name
|
||||
itemPoster.uri = itemData.widePosterURL
|
||||
return
|
||||
|
@ -67,7 +67,7 @@ sub Main()
|
||||
else if isNodeEvent(msg, "selectedItem")
|
||||
' If you select a library from ANYWHERE, follow this flow
|
||||
selectedItem = msg.getData()
|
||||
if selectedItem.type = "CollectionFolder" AND selectedItem.collectionType = "movies"
|
||||
if (selectedItem.type = "CollectionFolder" OR selectedItem.type = "UserView") AND selectedItem.collectionType = "movies"
|
||||
group.lastFocus = group.focusedChild
|
||||
group.setFocus(false)
|
||||
group.visible = false
|
||||
@ -75,7 +75,7 @@ sub Main()
|
||||
group = CreateMovieListGroup(selectedItem.Id)
|
||||
group.overhangTitle = selectedItem.name
|
||||
m.scene.appendChild(group)
|
||||
else if selectedItem.type = "CollectionFolder" AND selectedItem.collectionType = "tvshows"
|
||||
else if (selectedItem.type = "CollectionFolder" OR selectedItem.type = "UserView") AND selectedItem.collectionType = "tvshows"
|
||||
group.lastFocus = group.focusedChild
|
||||
group.setFocus(false)
|
||||
group.visible = false
|
||||
@ -84,7 +84,7 @@ sub Main()
|
||||
group = CreateSeriesListGroup(selectedItem.Id)
|
||||
group.overhangTitle = selectedItem.name
|
||||
m.scene.appendChild(group)
|
||||
else if selectedItem.type = "CollectionFolder" AND selectedItem.collectionType = "boxsets"
|
||||
else if (selectedItem.type = "CollectionFolder" OR selectedItem.type = "UserView") AND selectedItem.collectionType = "boxsets"
|
||||
group.lastFocus = group.focusedChild
|
||||
group.setFocus(false)
|
||||
group.visible = false
|
||||
|
@ -73,6 +73,8 @@ function ItemList(library_id = invalid as string, params = {})
|
||||
params["page"] = 1
|
||||
end if
|
||||
params["parentid"] = library_id
|
||||
params["recursive"] = true
|
||||
|
||||
url = Substitute("Users/{0}/Items/", get_setting("active_user"))
|
||||
resp = APIRequest(url, params)
|
||||
data = getJson(resp)
|
||||
|
Loading…
Reference in New Issue
Block a user