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 Jan 2, 2024
1 parent 11f8b60 commit 23b013f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
11 changes: 11 additions & 0 deletions docs/api/components_ItemGrid_GridItem.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

m.unplayedCount = m.top.findNode("unplayedCount")
m.unplayedEpisodeCount = m.top.findNode("unplayedEpisodeCount")
m.playedIndicator = m.top.findNode("playedIndicator")
m.checkmark = m.top.findNode("checkmark")
m.checkmark.width = 90
m.checkmark.height = 60

m.itemText.translation = [0, m.itemPoster.height + 7]

Expand Down Expand Up @@ -46,6 +50,10 @@
if itemData = invalid then return

if itemData.type = "Movie"
if isValid(itemData.json) and isValid(itemData.json.UserData) and isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played
m.playedIndicator.visible = true
end if

m.itemPoster.uri = itemData.PosterUrl
m.itemIcon.uri = itemData.iconUrl
m.itemText.text = itemData.Title
Expand All @@ -61,6 +69,9 @@
end if
end if
end if
if isValid(itemData.json) and isValid(itemData.json.UserData) and isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played = true
m.playedIndicator.visible = true
end if

m.itemPoster.uri = itemData.PosterUrl
m.itemIcon.uri = itemData.iconUrl
Expand Down
5 changes: 5 additions & 0 deletions docs/api/components_ItemGrid_GridItemSmall.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
m.posterText.font.size = 30
m.title.font.size = 25
m.backdrop = m.top.findNode("backdrop")
m.playedIndicator = m.top.findNode("playedIndicator")

m.itemPoster.observeField("loadStatus", "onPosterLoadStatusChanged")

Expand Down Expand Up @@ -39,6 +40,10 @@

if not isValid(itemData) then return

if isValid(itemData.json) and isValid(itemData.json.UserData) and isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played
m.playedIndicator.visible = true
end if

m.itemPoster.uri = itemData.PosterUrl
m.posterText.text = itemData.title
m.title.text = itemData.title
Expand Down
8 changes: 8 additions & 0 deletions docs/api/components_ListPoster.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
m.poster = m.top.findNode("poster")
m.unplayedCount = m.top.findNode("unplayedCount")
m.unplayedEpisodeCount = m.top.findNode("unplayedEpisodeCount")
m.playedIndicator = m.top.findNode("playedIndicator")
m.checkmark = m.top.findNode("checkmark")
m.checkmark.width = 90
m.checkmark.height = 60

m.backdrop = m.top.findNode("backdrop")

Expand Down Expand Up @@ -67,6 +71,10 @@
end if
end if

if isValid(itemData.json) and isValid(itemData.json.UserData) and isValid(itemData.json.UserData.Played) and itemData.json.UserData.Played
m.playedIndicator.visible = true
end if

if itemData.json.lookup("Type") = "Episode" and isValid(itemData.json.IndexNumber)
m.title.text = StrI(itemData.json.IndexNumber) + ". " + m.title.text

Expand Down
5 changes: 1 addition & 4 deletions docs/api/source_api_Items.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@
tmp.json = data
return tmp
else if data.type = "Episode"
' param = { "AddPlayedIndicator": data.UserData.Played }
' imgParams.Append(param)
tmp = CreateObject("roSGNode", "TVEpisodeData")
tmp.image = PosterImage(data.id, imgParams)
tmp.json = data
Expand Down Expand Up @@ -412,9 +410,8 @@

results = []
for each item in data.Items
imgParams = { "AddPlayedIndicator": item.UserData.Played }
tmp = CreateObject("roSGNode", "TVSeasonData")
tmp.image = PosterImage(item.id, imgParams)
tmp.image = PosterImage(item.id)
tmp.json = item
results.push(tmp)
end for
Expand Down

0 comments on commit 23b013f

Please sign in to comment.