dont put buttons on playback failure dialogs

This commit is contained in:
sevenrats 2023-01-30 20:07:51 -05:00
parent a5c0a40ee3
commit 7783e7520e

View File

@ -114,9 +114,7 @@ sub onState(msg)
' If an error was encountered, Display dialog
dialog = createObject("roSGNode", "Dialog")
dialog.title = tr("Error During Playback")
dialog.buttons = [tr("OK")]
dialog.message = tr("An error was encountered while playing this item.")
dialog.observeField("buttonSelected", "dialogClosed")
m.top.getScene().dialog = dialog
end if
@ -199,9 +197,7 @@ sub bufferCheck(msg)
' If buffering has stopped Display dialog
dialog = createObject("roSGNode", "Dialog")
dialog.title = tr("Error Retrieving Content")
dialog.buttons = [tr("OK")]
dialog.message = tr("There was an error retrieving the data for this item from the server.")
dialog.observeField("buttonSelected", "dialogClosed")
m.top.getScene().dialog = dialog
' Stop playback and exit player
@ -212,14 +208,6 @@ sub bufferCheck(msg)
end sub
'
' Clean up on Dialog Closed
sub dialogClosed(msg)
sourceNode = msg.getRoSGNode()
sourceNode.unobserveField("buttonSelected")
sourceNode.close = true
end sub
function onKeyEvent(key as string, press as boolean) as boolean
if key = "OK" and m.nextEpisodeButton.hasfocus() and not m.top.trickPlayBar.visible