Skip to content

Commit

Permalink
Update API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jellyfin-bot committed Nov 10, 2024
1 parent 32a8302 commit 6dcf913
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
28 changes: 19 additions & 9 deletions docs/api/components_home_HomeItem.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,15 @@
if isValid(m.unplayedCount) then m.unplayedCount.visible = false
itemData = m.top.itemContent
if itemData = invalid then return
userSettings = m.global.session.user.settings

itemData.Title = itemData.name ' Temporarily required while we move from "HomeItem" to "JFContentItem"

' validate to prevent crash
userSettings = invalid
if isValid(m.global) and isValid(m.global.session) and isValid(m.global.session.user) and isValid(m.global.session.user.settings)
userSettings = m.global.session.user.settings
end if

' validate to prevent crash
if not isValid(m.itemPoster) then initItemPoster()
if not isValid(m.itemText) then initItemText()
Expand Down Expand Up @@ -166,17 +171,22 @@
drawProgressBar(itemData)
end if

if userSettings["ui.general.episodeimagesnextup"] = "webclient"
tmpSetting = m.global.session.user.Configuration.useEpisodeImagesInNextUpAndResume
if isValid(tmpSetting) and tmpSetting
m.itemPoster.uri = itemData.thumbnailURL
else
if isValid(userSettings)
if userSettings["ui.general.episodeimagesnextup"] = "webclient"
tmpSetting = m.global.session.user.Configuration.useEpisodeImagesInNextUpAndResume
if isValid(tmpSetting) and tmpSetting
m.itemPoster.uri = itemData.thumbnailURL
else
m.itemPoster.uri = itemData.widePosterURL
end if
else if userSettings["ui.general.episodeimagesnextup"] = "show"
m.itemPoster.uri = itemData.widePosterURL
else if userSettings["ui.general.episodeimagesnextup"] = "episode"
m.itemPoster.uri = itemData.thumbnailURL
end if
else if userSettings["ui.general.episodeimagesnextup"] = "show"
else
' use show image if user settings are invalid for some reason
m.itemPoster.uri = itemData.widePosterURL
else if userSettings["ui.general.episodeimagesnextup"] = "episode"
m.itemPoster.uri = itemData.thumbnailURL
end if

' Set Series and Episode Number for Extra Text
Expand Down
7 changes: 6 additions & 1 deletion docs/api/components_tvshows_TVListDetails.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@
if isValid(itemData.MediaSources)
for i = 0 to itemData.MediaSources.Count() - 1
if item.selectedVideoStreamId = itemData.MediaSources[i].id and isValid(itemData.MediaSources[i].MediaStreams[0])
m.videoCodec.text = tr("Video") + ": " + itemData.MediaSources[i].MediaStreams[0].DisplayTitle
m.videoCodec.text = tr("Video") + ": "
if isValid(itemData.MediaSources[i].MediaStreams[0].DisplayTitle)
m.videoCodec.text = m.videoCodec.text + itemData.MediaSources[i].MediaStreams[0].DisplayTitle
else
m.videoCodec.text = m.videoCodec.text + tr("N/A")
end if
SetupAudioDisplay(itemData.MediaSources[i].MediaStreams, item.selectedAudioStreamIndex)
exit for
end if
Expand Down

0 comments on commit 6dcf913

Please sign in to comment.