Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Live TV Series Title, Season Number, and Episode Number to OSD #2032

Merged
merged 1 commit into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions components/ItemGrid/LoadVideoContentTask.bs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,21 @@ sub LoadItems_AddVideoContent(video as object, mediaSourceId as dynamic, audio_s
end if
end if

if videotype = "tvchannel" and isValid(meta.json) and isValid(meta.json.CurrentProgram)
if isValid(meta.json.CurrentProgram.Name)
meta.title = `${meta.title}: ${meta.json.CurrentProgram.Name}`
end if
if isValid(meta.json.CurrentProgram.ParentIndexNumber)
video.seasonNumber = meta.json.CurrentProgram.ParentIndexNumber
end if
if isValid(meta.json.CurrentProgram.IndexNumber)
video.episodeNumber = meta.json.CurrentProgram.IndexNumber
end if
if isValid(meta.json.CurrentProgram.IndexNumberEnd)
video.episodeNumberEnd = meta.json.CurrentProgram.IndexNumberEnd
end if
end if

video.chapters = meta.json.Chapters
video.content.title = meta.title
video.showID = meta.showID
Expand Down
2 changes: 1 addition & 1 deletion components/video/VideoPlayerView.bs
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ sub onVideoContentLoaded()
m.osd.itemTitleText = m.top.content.title

' If video is an episode, attempt to add season and episode numbers to OSD
if m.top.content.contenttype = 4
if m.top.content.contenttype = 4 or m.top.content.live
if isValid(videoContent[0].seasonNumber)
m.osd.seasonNumber = videoContent[0].seasonNumber
end if
Expand Down
Loading