mirror of
https://github.com/jellyfin/jellyfin-roku.git
synced 2025-02-23 08:21:13 +00:00
Merge pull request #1756 from photonconvergence/hide-movie-ratings
This commit is contained in:
commit
9fe5f5f62a
@ -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 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
|
||||
|
||||
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 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
|
||||
|
||||
|
@ -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]">
|
||||
<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]">
|
||||
<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>Community and Critical Ratings</source>
|
||||
<translation>Community and Critical Ratings</translation>
|
||||
<extracomment>User Setting - Setting title</extracomment>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ratings for how good a movie is</source>
|
||||
<translation>Ratings for how good a movie is</translation>
|
||||
<extracomment>User Setting - Setting description</extracomment>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -335,6 +335,13 @@
|
||||
"id": "MoviesGrid"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Community and Critical Ratings",
|
||||
"description": "Ratings for how good a movie is.",
|
||||
"settingName": "ui.movies.showRatings",
|
||||
"type": "bool",
|
||||
"default": "true"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user