Video Player Hook

Greetings…



i like to make a little hook script when i press play/pause/stop while playing a video. i just want call/start a system command or shell script.


  • is this possible with a pyton script/plugin or do i have to edit the plex source?
  • is there a script/plugin API documentation? or a simple example for understanding.



    i “speak” bash/perl and a little bit python, so i just need the hook syntax (if there is one)



    the main goal is to send an I/O command via an usb-I/O adapter to toggle/dimm the roomlight



    any info/suggestion/help would be nice



    thanks in advance

Sorry, there’s no way of doing this currently. It’s something we want to add to future versions as part of a bigger “event” system :slight_smile:

that would be so awesome, having plex intelligently control the room lighting!


You got 3 days :D

Ok, i will wait. In the meantime I found a dirty workaround: I monitor the plex process via [ps-watcher](http://ps-watcher.sourceforge.net/). If the plex process hit 50% CPU ps-watch will run a shell command. (and run enother if it goes back)

On my mac mini plex use 12% cpu while in menu or pause. while play 1080p it use ~70%.

For the light this could be enought, for my second [goal](http://forums.plexapp.com/index.php?showtopic=7264&hl=) (play 2 different sound track on 2 different audio interfaces) i guess it won't be very syncron.

Very cool. :slight_smile:



So many possibilities.

:frowning:



i wish i was a bigger nerd…





sigh…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.