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 Apr 28, 2024
1 parent 9fe5f5f commit 8712168
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 26 deletions.
26 changes: 14 additions & 12 deletions docs/api/components_ItemGrid_MovieLibraryView.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -570,22 +570,24 @@

m.star.uri = "pkg:/images/sharp_star_white_18dp.png"

if isValid(itemData.communityRating)
setFieldText("communityRating", int(itemData.communityRating * 10) / 10)
m.communityRatingGroup.visible = true
end if
if m.global.session.user.settings["ui.movies.showRatings"]
if isValid(itemData.communityRating)
setFieldText("communityRating", int(itemData.communityRating * 10) / 10)
m.communityRatingGroup.visible = true
end if

if isValid(itemData.CriticRating)
setFieldText("criticRatingLabel", itemData.criticRating)
if isValid(itemData.CriticRating)
setFieldText("criticRatingLabel", itemData.criticRating)

tomato = "pkg:/images/rotten.png"
tomato = "pkg:/images/rotten.png"

if itemData.CriticRating > 60
tomato = "pkg:/images/fresh.png"
end if
if itemData.CriticRating > 60
tomato = "pkg:/images/fresh.png"
end if

m.criticRatingIcon.uri = tomato
m.criticRatingGroup.visible = true
m.criticRatingIcon.uri = tomato
m.criticRatingGroup.visible = true
end if
end if

if isValid(itemData.Name)
Expand Down
30 changes: 16 additions & 14 deletions docs/api/components_movies_MovieDetails.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,25 @@
m.infoGroup.removeChild(m.top.findNode("officialRating"))
end if

if itemData.communityRating <> invalid
setFieldText("communityRating", int(itemData.communityRating * 10) / 10)
m.top.findNode("communityRatingGroup").visible = "true"
else
' hide the star icon
m.infoGroup.removeChild(m.top.findNode("communityRatingGroup"))
end if

if itemData.CriticRating <> invalid
setFieldText("criticRatingLabel", itemData.criticRating)
if itemData.CriticRating > 60
tomato = "pkg:/images/fresh.png"
if m.global.session.user.settings["ui.movies.showRatings"]
if isValid(itemData.communityRating)
setFieldText("communityRating", int(itemData.communityRating * 10) / 10)
else
tomato = "pkg:/images/rotten.png"
m.infoGroup.removeChild(m.top.findNode("communityRatingGroup"))
end if
if isValid(itemData.CriticRating)
setFieldText("criticRatingLabel", itemData.criticRating)
if itemData.CriticRating > 60
tomato = "pkg:/images/fresh.png"
else
tomato = "pkg:/images/rotten.png"
end if
m.top.findNode("criticRatingIcon").uri = tomato
else
m.infoGroup.removeChild(m.top.findNode("criticRatingGroup"))
end if
m.top.findNode("criticRatingIcon").uri = tomato
else
m.infoGroup.removeChild(m.top.findNode("communityRatingGroup"))
m.infoGroup.removeChild(m.top.findNode("criticRatingGroup"))
end if

Expand Down

0 comments on commit 8712168

Please sign in to comment.