Closed lulol closed 3 years ago
*Urgh* Sorry for the mess. Hope you squash all these commits. :(
I like the idea, but that is a dangerous loop that could never end. Maybe adding a simple counter up to a value in seconds will guarantee that the wait is no longer than N seconds. Also, just throwing ideas here, it would be nice to show that the process is waiting in the loop by maybe temporarily change the box color around the MPV window or some other visual indications.
You are right. Added a Gtk.events_pending()
to handle main loop events while waiting, that I think that may be a better approach than a fixed timeout, but my Gtk knowledge is *very* limited.
Already had tried calling the main gtk loop after the sleep with Gtk.main_iteration_do(False)
but that didn't seem to do anything.
The UI already shows a spinner in the widget window before mpv tries to start displaying the content before the window is created. But I guess that you always can press the back button and try again like sometimes is needed now without this patch.
Wait for window to get ready before retrieving properties and playing content to avoid failures with local content.