Skip to content

Commit

Permalink
Use movie logo in OSD when playing trailer
Browse files Browse the repository at this point in the history
Fixes #39
  • Loading branch information
1hitsong committed Sep 20, 2024
1 parent 9ad8563 commit ba793ee
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
9 changes: 9 additions & 0 deletions components/ItemGrid/LoadVideoContentTask.bs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ sub LoadItems_AddVideoContent(video as object, mediaSourceId as dynamic, audio_s
end if
end if

if isValid(meta.json.extratype)
if LCase(meta.json.extratype) = "trailer"
if isValidAndNotEmpty(meta.json.parentlogoitemid)
logoLookupID = meta.json.parentlogoitemid
video.extraType = "trailer"
end if
end if
end if

logoImageExists = api.items.HeadImageURLByName(logoLookupID, "logo")
if logoImageExists
video.logoImage = api.items.GetImageURL(logoLookupID, "logo", 0, { "maxHeight": 65, "maxWidth": 300, "quality": "90" })
Expand Down
4 changes: 2 additions & 2 deletions components/video/VideoPlayerView.bs
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,8 @@ sub onVideoContentLoaded()
if isValidAndNotEmpty(videoContent[0].logoImage)
m.osd.logoImage = videoContent[0].logoImage

' Don't show both the logo and the video title if this isn't an episode
if m.top.content.contenttype <> 4
' Don't show both the logo and the video title if this isn't an episode or trailer
if m.top.content.contenttype <> 4 and videoContent[0].extraType <> "trailer"
m.osd.itemTitleText = string.EMPTY
end if
end if
Expand Down
4 changes: 4 additions & 0 deletions source/static/whatsNew/1.0.6.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@
{
"description": "Fix episode list vVideo codec display when video is not media stream 0",
"author": "1hitsong"
},
{
"description": "Use movie logo in OSD when playing trailer",
"author": "1hitsong"
}
]

0 comments on commit ba793ee

Please sign in to comment.