Update API docs

This commit is contained in:
jellyfin-bot 2024-03-11 00:25:10 +00:00
parent 36eabb43cc
commit 6573aa426d

View File

@ -67,16 +67,8 @@ end sub
' User requested subtitle selection popup ' User requested subtitle selection popup
sub onSelectSubtitlePressed() sub onSelectSubtitlePressed()
' None is always first in the subtitle list
subtitleData = { subtitleData = {
data: [{ data: []
"Index": -1,
"IsExternal": false,
"Track": {
"description": "None"
},
"Type": "subtitleselection"
}]
} }
for each item in m.view.fullSubtitleData for each item in m.view.fullSubtitleData
@ -102,9 +94,24 @@ sub onSelectSubtitlePressed()
end if end if
end if end if
' Put the selected item at the top of the option list
if isValid(item.selected) and item.selected
subtitleData.data.Unshift(item)
else
subtitleData.data.push(item) subtitleData.data.push(item)
end if
end for end for
' Manually create the None option and place at top
subtitleData.data.Unshift({
"Index": -1,
"IsExternal": false,
"Track": {
"description": "None"
},
"Type": "subtitleselection"
})
m.global.sceneManager.callFunc("radioDialog", tr("Select Subtitles"), subtitleData) m.global.sceneManager.callFunc("radioDialog", tr("Select Subtitles"), subtitleData)
m.global.sceneManager.observeField("returnData", "onSelectionMade") m.global.sceneManager.observeField("returnData", "onSelectionMade")
end sub end sub