Need my script to override player keymap
#1
I am a noob resurrecting the Random Trailers script. I want to define my own actions when playing a trailer but I end up competing with the built-in behavior. Sometimes my python Dialog gets the event, sometimes I get it after the skin gets done with it (displaying OSD, for example). Is there a way to have my own skin just for when this addon runs?

The addon has two Dialogs:
  TrailerDialog, a Modal WindowDialog with a text control to optionally display the title while playing video
  TrailerInfoDialog, written as an .xml file and instantiated as a WindowXMLDialog. This dialog is used in place of the normal "Info" dialog.

I have tried various things, including also making TrailerInfoDialog Modal, which sort-of works, but invariably events start being intercepted by what the skin has defined. As an aside, I learned that a WindowXMLDialog's onInit method is not called after a show, but doModal. I was experimenting with keeping only the parent dialog modal to see what happend, but without onInit being run I was stuck.

Surely Youtube, Plex and other addons have figured a way around this.
Reply
#2
Looks like Plex went through extraordinary means to address this. In player.py they shadow the Player's state including detecting when OSD and Info is being displayed via xbmc.getCondVisibility('Window.IsActive(videoosd) | Player.ShowInfo') Yuk. But if that is what it takes.... I think I'll try a couple of ideas first, but I'll probably have to end up going Plex's route.
Reply

Logout Mark Read Team Forum Stats Members Help
Need my script to override player keymap0