Open albfan opened 3 years ago
I think your method and expectation here are a little incorrect. subprocess and xbmc.play have nothing to do with each other. Take a look at the methods used in the addon here
If the goal is to kill the subprocess with Kodi (which I don't think you'd want - the subprocess should be killed by the spawned program directly), you can use a modal dialog similar to the one used in the link above and have the user press a button on the modal to trigger subprocess to end.
Hi @zach-morris, thanks for review. I'm not sure what a dialogprogress is,so I tried to install your plugin using your repository, but it fails due to missing dependencies:
So just guessing, a dialog would be something permanently shown on screen where you can cancel. Loose part of the screen for this, looks unnecessary. Listen to exit key to kill the process looks easier and more intuitive for me.
If you can share a screencast or screenshots of that dialog process that would be great to understand how that works.
Current approach for Ruyjinx emulator is that Ryujinx stop itself, so you return to kodi as that was the last app with focus. But then a first key press on exit needs to be done to kill the infinite loop.
This issue is now marked stale because it has been open over a year without activity. Remove the stale label or add a comment to reset the stale state.
fore you create a new problem report: https://kodi.wiki/view/HOW-TO:Submit_a_bug_report -->
Bug report
Describe the bug
Trying to create a addon to run a game emulator https://github.com/xbmc/repo-plugins/pull/3510
Didn't find a way to use kodi.gameclient, so
xbmcplugin.setResolvedUrl
replies with "no available emulators error". To solve that (not sure if there's a better approach) a subprocess is used.I miss that we can extend escape/exit button (I'm using hdmi-cec so I'm pressing exit from a remote control) to kill the subprocess and stop the emulation
The use case is I'm using a media center so there's no accesible keyboard to kill emulator or a mouse to close a window.
Expected Behavior
Given a subprocess running:
Actual Behavior
On play a game, Kodi keeps the loading animation and emulator run on subprocess is running above kodi Pressing exit on remote control, kodi returns to game list selection, but subprocess is not killed
To Reproduce
Steps to reproduce the behavior:
Launch a subprocess and try to kill it on escape or exit
Debuglog
N/A
Screenshots
N/A
Additional context or screenshots (if appropriate)
N/A
Your Environment
Used Operating system:
[ ] Android
[ ] iOS
[ ] tvOS
[x] Linux
[ ] OSX
[ ] Windows
[ ] Windows UWP
Operating system version/name: Fedora 33
Kodi version: 19.0