Merge pull request #664 from 1hitsong/hide-movie-tagline-setting

Add setting to hide taglines on movie detail pages
This commit is contained in:
Jimi 2022-06-23 08:46:26 -06:00 committed by GitHub
commit e2b822291a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 4 deletions

View File

@ -12,6 +12,9 @@ sub init()
overview = m.top.findNode("overview")
overview.width = 1920 - 96 - 300 - 96 - 30
m.details = m.top.findNode("details")
m.tagline = m.top.findNode("tagline")
m.buttonGrp = m.top.findNode("buttons")
m.buttonGrp.setFocus(true)
m.top.lastFocus = m.buttonGrp
@ -90,9 +93,13 @@ sub itemContentChanged()
if itemData.mediaStreams[0] <> invalid
setFieldText("video_codec", tr("Video") + ": " + itemData.mediaStreams[0].displayTitle)
end if
' TODO - cmon now. these are buttons, not words
if itemData.taglines.count() > 0
setFieldText("tagline", itemData.taglines[0])
if get_user_setting("ui.details.hidetagline") = "false"
if itemData.taglines.count() > 0
setFieldText("tagline", itemData.taglines[0])
end if
else
m.details.removeChild(m.tagline)
end if
setFavoriteColor()

View File

@ -5,7 +5,7 @@
<Poster id="moviePoster"
translation="[250,150]"
width="300" height="450" />
<LayoutGroup layoutDirection="vert" translation="[455, 150]" itemSpacings="[25]">
<LayoutGroup layoutDirection="vert" translation="[455, 150]" itemSpacings="[25]" id="details">
<LayoutGroup layoutDirection="horiz" itemSpacings="[100]" id="infoGroup">
<Label id="releaseYear" />
<Label id="runtime" />
@ -50,5 +50,6 @@
<field id="selectedVideoStreamId" type="string" />
</interface>
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="MovieDetails.brs" />
</component>

View File

@ -583,6 +583,24 @@
<translation>Use the replay button to slowly animate to the first item in the folder. (If disabled, The folder will reset to the first item immediately)</translation>
<extracomment>Description for option in Setting Screen</extracomment>
</message>
<message>
<source>Detail Page</source>
<translation>Detail Page</translation>
</message>
<message>
<source>Options for details pages.</source>
<translation>Options for details pages.</translation>
<extracomment>Description for Detail Page user settings.</extracomment>
</message>
<message>
<source>Hide Taglines</source>
<translation>Hide Taglines</translation>
<extracomment>Option Title in user setting screen</extracomment>
</message>
<message>
<source>Hides tagline text on details pages.</source>
<translation>Hides tagline text on details pages.</translation>
</message>
<message>
<source>TV Shows</source>
<translation>TV Shows</translation>

View File

@ -17,6 +17,19 @@
"description": "Settings relating to how the how the application looks",
"children": [
{
"title": "Detail Page",
"description": "Options for details pages.",
"children": [
{
"title": "Hide Taglines",
"description": "Hides tagline text on details pages.",
"settingName": "ui.details.hidetagline",
"type": "bool",
"default": "false"
}
]
},
{
"title": "TV Shows",
"description": "Options for TV Shows.",
"children": [