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 30, 2023
1 parent 39448b7 commit 1a3313b
Show file tree
Hide file tree
Showing 26 changed files with 176 additions and 129 deletions.
19 changes: 8 additions & 11 deletions docs/api/components_ItemGrid_ItemGrid.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@
'set inital counts for overhang before content is loaded.
m.loadItemsTask.totalRecordCount = 0

m.spinner = m.top.findNode("spinner")
m.spinner.visible = true

m.Alpha = m.top.findNode("AlphaMenu")
m.AlphaSelected = m.top.findNode("AlphaSelected")

Expand All @@ -94,7 +91,7 @@
'Load initial set of Data
sub loadInitialItems()
m.loadItemsTask.control = "stop"
m.spinner.visible = true
startLoadingSpinner()

if m.top.parentItem.json.Type = "CollectionFolder" 'or m.top.parentItem.json.Type = "Folder"
m.top.HomeLibraryItem = m.top.parentItem.Id
Expand Down Expand Up @@ -240,7 +237,7 @@
end if

m.loadItemsTask.observeField("content", "ItemDataLoaded")
m.spinner.visible = true
startLoadingSpinner(false)
m.loadItemsTask.control = "RUN"
SetUpOptions()
end sub
Expand Down Expand Up @@ -452,6 +449,7 @@
'
'Handle loaded data, and add to Grid
sub ItemDataLoaded(msg)
stopLoadingSpinner()
m.top.alphaActive = false
itemData = msg.GetData()
m.loadItemsTask.unobserveField("content")
Expand All @@ -477,7 +475,7 @@
m.genreList.setFocus(true)

m.loading = false
m.spinner.visible = false
stopLoadingSpinner()
return
end if

Expand All @@ -500,7 +498,7 @@

m.itemGrid.setFocus(true)
m.genreList.setFocus(false)
m.spinner.visible = false
stopLoadingSpinner()
end sub

'
Expand Down Expand Up @@ -573,7 +571,7 @@
'
'Load next set of items
sub loadMoreData()
m.spinner.visible = true
startLoadingSpinner(false)
if m.Loading = true then return
m.Loading = true
m.loadItemsTask.startIndex = m.loadedItems
Expand All @@ -596,7 +594,7 @@
m.loadItemsTask.searchTerm = ""
m.VoiceBox.text = ""
m.loadItemsTask.nameStartsWith = m.alpha.itemAlphaSelected
m.spinner.visible = true
startLoadingSpinner(false)
loadInitialItems()
end if
end sub
Expand All @@ -611,7 +609,7 @@
m.loadItemsTask.NameStartsWith = " "
m.loadItemsTask.searchTerm = m.voiceBox.text
m.loadItemsTask.recursive = true
m.spinner.visible = true
startLoadingSpinner(false)
loadInitialItems()
end if
end sub
Expand Down Expand Up @@ -847,7 +845,6 @@
end if

if key = "replay"
m.spinner.visible = true
m.loadItemsTask.searchTerm = ""
m.loadItemsTask.nameStartsWith = ""
m.voiceBox.text = ""
Expand Down
15 changes: 4 additions & 11 deletions docs/api/components_ItemGrid_MovieLibraryView.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
m.selectedMovieOfficialRating = m.top.findNode("selectedMovieOfficialRating")
m.movieLogo = m.top.findNode("movieLogo")
m.swapAnimation = m.top.findNode("backroundSwapAnimation")
m.spinner = m.top.findNode("spinner")
m.Alpha = m.top.findNode("AlphaMenu")
m.AlphaSelected = m.top.findNode("AlphaSelected")
m.micButton = m.top.findNode("micButton")
Expand Down Expand Up @@ -85,8 +84,6 @@
'set inital counts for overhang before content is loaded.
m.loadItemsTask.totalRecordCount = 0

m.spinner.visible = true

'Get reset folder setting
m.resetGrid = m.global.session.user.settings["itemgrid.reset"]

Expand Down Expand Up @@ -119,7 +116,7 @@
'Load initial set of Data
sub loadInitialItems()
m.loadItemsTask.control = "stop"
m.spinner.visible = true
startLoadingSpinner(false)

if m.top.parentItem.json.Type = "CollectionFolder"
m.top.HomeLibraryItem = m.top.parentItem.Id
Expand Down Expand Up @@ -221,7 +218,6 @@
end if

m.loadItemsTask.observeField("content", "ItemDataLoaded")
m.spinner.visible = true
m.loadItemsTask.control = "RUN"

m.getFiltersTask.observeField("filters", "FilterDataLoaded")
Expand Down Expand Up @@ -438,7 +434,7 @@
m.genreList.setFocus(true)

m.loading = false
m.spinner.visible = false
stopLoadingSpinner()
' Return focus to options menu if it was opened while library was loading
if m.options.visible
m.options.setFocus(true)
Expand Down Expand Up @@ -488,7 +484,7 @@
m.emptyText.visible = true
end if

m.spinner.visible = false
stopLoadingSpinner()
' Return focus to options menu if it was opened while library was loading
if m.options.visible
m.options.setFocus(true)
Expand Down Expand Up @@ -693,7 +689,7 @@
'
'Load next set of items
sub loadMoreData()
m.spinner.visible = true
startLoadingSpinner(false)
if m.Loading = true then return
m.Loading = true
m.loadItemsTask.startIndex = m.loadedItems
Expand Down Expand Up @@ -738,7 +734,6 @@
m.loadItemsTask.searchTerm = ""
m.VoiceBox.text = ""
m.loadItemsTask.nameStartsWith = m.alpha.itemAlphaSelected
m.spinner.visible = true
loadInitialItems()
end if
end sub
Expand All @@ -753,7 +748,6 @@
m.loadItemsTask.NameStartsWith = " "
m.loadItemsTask.searchTerm = m.voiceBox.text
m.loadItemsTask.recursive = true
m.spinner.visible = true
loadInitialItems()
end if
end sub
Expand Down Expand Up @@ -926,7 +920,6 @@
end if

if key = "replay"
m.spinner.visible = true
m.loadItemsTask.searchTerm = ""
m.loadItemsTask.nameStartsWith = ""
m.voiceBox.text = ""
Expand Down
15 changes: 3 additions & 12 deletions docs/api/components_ItemGrid_MusicLibraryView.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
m.selectedArtistGenres = m.top.findNode("selectedArtistGenres")
m.artistLogo = m.top.findNode("artistLogo")
m.swapAnimation = m.top.findNode("backroundSwapAnimation")
m.spinner = m.top.findNode("spinner")
m.Alpha = m.top.findNode("AlphaMenu")
m.AlphaSelected = m.top.findNode("AlphaSelected")
m.micButton = m.top.findNode("micButton")
Expand Down Expand Up @@ -79,8 +78,6 @@
'set inital counts for overhang before content is loaded.
m.loadItemsTask.totalRecordCount = 0

m.spinner.visible = true

'Get reset folder setting
m.resetGrid = m.global.session.user.settings["itemgrid.reset"]

Expand Down Expand Up @@ -113,7 +110,7 @@
'Load initial set of Data
sub loadInitialItems()
m.loadItemsTask.control = "stop"
m.spinner.visible = true
startLoadingSpinner()

if LCase(m.top.parentItem.json.Type) = "collectionfolder"
m.top.HomeLibraryItem = m.top.parentItem.Id
Expand Down Expand Up @@ -206,7 +203,6 @@
end if

m.loadItemsTask.observeField("content", "ItemDataLoaded")
m.spinner.visible = true
m.loadItemsTask.control = "RUN"
SetUpOptions()
end sub
Expand Down Expand Up @@ -328,6 +324,7 @@
'
'Handle loaded data, and add to Grid
sub ItemDataLoaded(msg)
stopLoadingSpinner()
m.top.alphaActive = false
itemData = msg.GetData()
m.loadItemsTask.unobserveField("content")
Expand All @@ -353,7 +350,6 @@
m.loadedRows = m.loadedItems / m.genreList.numColumns

m.loading = false
m.spinner.visible = false
return
end if

Expand All @@ -376,8 +372,6 @@
m.emptyText.text = tr("NO_ITEMS").Replace("%1", m.top.parentItem.Type)
m.emptyText.visible = true
end if

m.spinner.visible = false
end sub

'
Expand Down Expand Up @@ -558,7 +552,7 @@
'
'Load next set of items
sub loadMoreData()
m.spinner.visible = true
startLoadingSpinner(false)
if m.Loading = true then return
m.Loading = true
m.loadItemsTask.startIndex = m.loadedItems
Expand Down Expand Up @@ -614,7 +608,6 @@
m.loadItemsTask.searchTerm = ""
m.VoiceBox.text = ""
m.loadItemsTask.nameStartsWith = m.alpha.itemAlphaSelected
m.spinner.visible = true
loadInitialItems()
end if
end sub
Expand All @@ -629,7 +622,6 @@
m.loadItemsTask.NameStartsWith = " "
m.loadItemsTask.searchTerm = m.voiceBox.text
m.loadItemsTask.recursive = true
m.spinner.visible = true
loadInitialItems()
end if
end sub
Expand Down Expand Up @@ -789,7 +781,6 @@
end if

if key = "replay"
m.spinner.visible = true
m.loadItemsTask.searchTerm = ""
m.loadItemsTask.nameStartsWith = ""
m.voiceBox.text = ""
Expand Down
21 changes: 21 additions & 0 deletions docs/api/components_JFScene.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@
sub init()
m.top.backgroundColor = "#262626" '"#101010"
m.top.backgroundURI = ""
m.spinner = m.top.findNode("spinner")
end sub

' Triggered when the isLoading boolean component field is changed
sub isLoadingChanged()
m.spinner.visible = m.top.isLoading
end sub

' Triggered when the disableRemote boolean component field is changed
sub disableRemoteChanged()
if m.top.disableRemote
dialog = createObject("roSGNode", "ProgressDialog")
dialog.id = "invisibiledialog"
dialog.visible = false
dialog.opacity = 0
m.top.dialog = dialog
else
if isValid(m.top.dialog)
m.top.dialog.close = true
end if
end if
end sub

function onKeyEvent(key as string, press as boolean) as boolean
Expand Down
2 changes: 1 addition & 1 deletion docs/api/components_Spinner.bs.html

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions docs/api/components_config_SetServerScreen.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
m.log = log.Logger("SetServerScreen")
m.top.setFocus(true)

m.spinner = m.top.findNode("spinner")
m.serverPicker = m.top.findNode("serverPicker")
m.serverUrlTextbox = m.top.findNode("serverUrlTextbox")
m.serverUrlContainer = m.top.findNode("serverUrlContainer")
Expand Down Expand Up @@ -78,7 +77,7 @@
'run the task
m.ssdpScanner.observeField("content", "ScanForServersComplete")
m.ssdpScanner.control = "RUN"
m.spinner.visible = true
startLoadingSpinner(false)
end sub

sub ScanForServersComplete(event)
Expand Down Expand Up @@ -111,7 +110,7 @@
end if

m.serverPicker.content = items
m.spinner.visible = false
stopLoadingSpinner()

'if we have at least one server, focus on the server picker
if m.servers.Count() > 0
Expand Down
12 changes: 6 additions & 6 deletions docs/api/components_liveTv_schedule.bs.html

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion docs/api/components_login_UserSelect.bs.html

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions docs/api/components_movies_MovieDetails.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
m.buttonGrp.setFocus(true)
m.top.lastFocus = m.buttonGrp

m.spinner = m.top.findNode("spinner")

m.top.observeField("itemContent", "itemContentChanged")
end sub

Expand Down Expand Up @@ -152,7 +150,7 @@
SetUpVideoOptions(itemData.mediaSources)
SetUpAudioOptions(itemData.mediaStreams)
m.buttonGrp.visible = true
m.spinner.visible = false
stopLoadingSpinner()
end sub


Expand Down
10 changes: 1 addition & 9 deletions docs/api/components_music_AlbumView.bs.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/api/components_music_ArtistView.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
m.overhang.isVisible = false
m.overhang.opacity = "1"
end if
stopLoadingSpinner()
end sub

sub OnScreenHidden()
Expand Down
1 change: 1 addition & 0 deletions docs/api/components_music_AudioPlayerView.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@
end sub

sub onAudioStreamLoaded()
stopLoadingSpinner()
data = m.LoadAudioStreamTask.content[0]
m.LoadAudioStreamTask.unobserveField("content")
if data <> invalid and data.count() > 0
Expand Down
10 changes: 1 addition & 9 deletions docs/api/components_music_PlaylistView.bs.html

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/api/components_photos_PhotoDetails.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
end sub

sub onPhotoLoaded()
stopLoadingSpinner()
if m.LoadLibrariesTask.results <> invalid
photo = m.top.findNode("photo")
photo.uri = m.LoadLibrariesTask.results
Expand Down
7 changes: 3 additions & 4 deletions docs/api/components_search_SearchResults.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

sub init()
m.top.optionsAvailable = false
m.searchSpinner = m.top.findnode("searchSpinner")
m.searchSelect = m.top.findnode("searchSelect")
m.searchTask = CreateObject("roSGNode", "SearchTask")

Expand All @@ -22,12 +21,12 @@
query = m.top.searchAlpha
'if user deletes the search string hide the spinner
if query.len() = 0
m.searchSpinner.visible = false
stopLoadingSpinner()
end if
'if search task is running and user selectes another letter stop the search and load the next letter
m.searchTask.control = "stop"
if query <> invalid and query <> ""
m.searchSpinner.visible = true
startLoadingSpinner(false)
end if
m.searchTask.observeField("results", "loadResults")
m.searchTask.query = query
Expand All @@ -39,7 +38,7 @@
sub loadResults()
m.searchTask.unobserveField("results")

m.searchSpinner.visible = false
stopLoadingSpinner()
m.searchSelect.itemdata = m.searchTask.results
m.searchSelect.query = m.top.SearchAlpha
m.searchHelpText.visible = false
Expand Down
Loading

0 comments on commit 1a3313b

Please sign in to comment.