mirror of
https://github.com/jellyfin/jellyfin-roku.git
synced 2025-02-19 22:41:47 +00:00
add option to hide ratings for movies
This commit is contained in:
parent
0defe7c941
commit
d5195339a0
@ -568,22 +568,24 @@ sub onItemFocused()
|
||||
|
||||
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 isValid(itemData.CriticRating)
|
||||
setFieldText("criticRatingLabel", itemData.criticRating)
|
||||
|
||||
tomato = "pkg:/images/rotten.png"
|
||||
|
||||
if itemData.CriticRating > 60
|
||||
tomato = "pkg:/images/fresh.png"
|
||||
if get_user_setting("ui.movies.disableRatings") = "false"
|
||||
if isValid(itemData.communityRating)
|
||||
setFieldText("communityRating", int(itemData.communityRating * 10) / 10)
|
||||
m.communityRatingGroup.visible = true
|
||||
end if
|
||||
|
||||
m.criticRatingIcon.uri = tomato
|
||||
m.criticRatingGroup.visible = true
|
||||
if isValid(itemData.CriticRating)
|
||||
setFieldText("criticRatingLabel", itemData.criticRating)
|
||||
|
||||
tomato = "pkg:/images/rotten.png"
|
||||
|
||||
if itemData.CriticRating > 60
|
||||
tomato = "pkg:/images/fresh.png"
|
||||
end if
|
||||
|
||||
m.criticRatingIcon.uri = tomato
|
||||
m.criticRatingGroup.visible = true
|
||||
end if
|
||||
end if
|
||||
|
||||
if isValid(itemData.Name)
|
||||
|
@ -76,23 +76,25 @@ sub itemContentChanged()
|
||||
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 get_user_setting("ui.movies.disableRatings") = "false"
|
||||
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
|
||||
|
||||
|
@ -8,11 +8,11 @@
|
||||
<Label id="releaseYear" />
|
||||
<Label id="runtime" />
|
||||
<Label id="officialRating" />
|
||||
<LayoutGroup id="communityRatingGroup" layoutDirection="horiz" itemSpacings="[-5]" visible="false">
|
||||
<LayoutGroup id="communityRatingGroup" layoutDirection="horiz" itemSpacings="[-5]" visible="true">
|
||||
<Poster id="star" uri="pkg:/images/sharp_star_white_18dp.png" height="32" width="32" blendColor="#cb272a" />
|
||||
<Label id="communityRating" />
|
||||
</LayoutGroup>
|
||||
<LayoutGroup layoutDirection="horiz" itemSpacings="[-5]" id="criticRatingGroup">
|
||||
<LayoutGroup id="criticRatingGroup" layoutDirection="horiz" itemSpacings="[-5]" visible="true">
|
||||
<Poster id="criticRatingIcon" height="32" width="32" />
|
||||
<Label id="criticRatingLabel" />
|
||||
</LayoutGroup>
|
||||
|
@ -1256,5 +1256,15 @@
|
||||
<translation>... (Press * to read more)</translation>
|
||||
<extracomment>Ellipsis Text for when text overflows its container</extracomment>
|
||||
</message>
|
||||
<message>
|
||||
<source>Disable Community and Critical Ratings</source>
|
||||
<translation>Disable Community and Critical Ratings</translation>
|
||||
<extracomment>User Setting - Setting title</extracomment>
|
||||
</message>
|
||||
<message>
|
||||
<source>Hide the star, community rating, tomato, and critical rating for Movies.</source>
|
||||
<translation>Hide the star, community rating, tomato, and critical rating for Movies.</translation>
|
||||
<extracomment>User Setting - Setting description</extracomment>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -335,6 +335,13 @@
|
||||
"id": "MoviesGrid"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Disable Community and Critical Ratings",
|
||||
"description": "Hide the star, community rating, tomato, and critical rating for Movies.",
|
||||
"settingName": "ui.movies.disableRatings",
|
||||
"type": "bool",
|
||||
"default": "false"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user