booch 32 Posted May 16, 2016 Share Posted May 16, 2016 (edited) Would be nice to have possibility to allow run custom scripts (e.g. Python, Bash) on some Emby events. At least for movie delete event from Movie details screen For instance: Add "Run script on movie delete action" field somewhere in administration page (empty by default). If path to script is defined then it will be executed with path to the deleted movie (or movie name) as first argument as soon as movie gets deleted from movie details screen. Why I need this: I have my own script with Prowl notifications. I would like to run this script (and notify me) when somebody delete movie Also it can be logging script or whatever. If it is possible to implement with a plugin - it would be nice as well Edited May 16, 2016 by booch 2 Link to comment Share on other sites More sharing options...
Vidman 589 Posted May 16, 2016 Share Posted May 16, 2016 (edited) You would have a better chance of this being implemented if you can come up with a use case that does not facilitate in the use of pirated content Edited May 16, 2016 by Vidman Link to comment Share on other sites More sharing options...
booch 32 Posted May 16, 2016 Author Share Posted May 16, 2016 (edited) You would have a better chance of this being implemented if you can come up with a use case that does not facilitate in the use of pirated content No problem I have my own script with Prowl notifications. For instance run this script (and notify me) when somebody delete movie Also it can be logging script or whatever. I can easily invent lots of useful legal use cases.. BTW. Torrents are not necessary related to the pirated content only Edited May 16, 2016 by booch Link to comment Share on other sites More sharing options...
Vidman 589 Posted May 16, 2016 Share Posted May 16, 2016 (edited) I know that, but your use case directly infers that it is for pirated content. ..am i wrong? Edited May 16, 2016 by Vidman Link to comment Share on other sites More sharing options...
booch 32 Posted May 16, 2016 Author Share Posted May 16, 2016 (edited) I know that, but your use case directly infers that it is for pirated content. ..am i wrong? You are completely wrong! I hate pirates. My brother is a sailor man and he hates them too! Edited May 16, 2016 by booch 2 Link to comment Share on other sites More sharing options...
Vidman 589 Posted May 16, 2016 Share Posted May 16, 2016 (edited) And as i said. ..i realise that [emoji14] Kidding Edited May 16, 2016 by Vidman Link to comment Share on other sites More sharing options...
booch 32 Posted May 16, 2016 Author Share Posted May 16, 2016 (edited) deleted.. Edited May 16, 2016 by booch Link to comment Share on other sites More sharing options...
chef 3745 Posted May 16, 2016 Share Posted May 16, 2016 @@booch If you change you original post, and not mention anything that goes against Embys terms and conditions. There maybe ways to run scripts and executables when certain events happen in the server by writing a plugin.. Link to comment Share on other sites More sharing options...
booch 32 Posted May 16, 2016 Author Share Posted May 16, 2016 @@booch If you change you original post, and not mention anything that goes against Embys terms and conditions. There maybe ways to run scripts and executables when certain events happen in the server by writing a plugin.. done Link to comment Share on other sites More sharing options...
chef 3745 Posted May 16, 2016 Share Posted May 16, 2016 So the plugin can use SessionManager to trigger events based on sessions (example: when a user logs in/out of a session, when playbacks stops etc.) LibraryManager class also has events in it, and I am pretty sure changes to Libraray (ie. Removal of Libraray items) are there. I will have to check to make sure, and I will get back to you 1 Link to comment Share on other sites More sharing options...
booch 32 Posted May 16, 2016 Author Share Posted May 16, 2016 I will have to check to make sure, and I will get back to you Thank you very much! Link to comment Share on other sites More sharing options...
ebr 14903 Posted May 17, 2016 Share Posted May 17, 2016 This would be possible with a plug-in as there are many events that could be subscribed to. However, I'm sure this will be the first plug-in we ask you to remove when performance problems are reported . Link to comment Share on other sites More sharing options...
booch 32 Posted May 17, 2016 Author Share Posted May 17, 2016 Do you mean that implementation itself would decrease performance or are you talking about scripts ? Anyway looking forward for this feature Link to comment Share on other sites More sharing options...
chef 3745 Posted May 19, 2016 Share Posted May 19, 2016 Sorry, I have the delete functions hooked up, but haven't written any interface. I have gotten busy at work. I haven't forgotten. Link to comment Share on other sites More sharing options...
booch 32 Posted May 19, 2016 Author Share Posted May 19, 2016 @@chef Thank you for your time! Actually it is not necessary to create any UI, if it requires a lot of your time then just kind of configuration file where I can put path to the script would be enough for me 1 Link to comment Share on other sites More sharing options...
booch 32 Posted June 1, 2016 Author Share Posted June 1, 2016 @chef Do you have any progress on my request? Thanks Link to comment Share on other sites More sharing options...
shred00 13 Posted November 16, 2018 Share Posted November 16, 2018 Did this every go anywhere? I too would like to execute a custom action (that I will write as a script of some sort) trigger on a media item delete. Link to comment Share on other sites More sharing options...
Luke 37007 Posted November 16, 2018 Share Posted November 16, 2018 This could be done via community plugin if someone would like to create one. Link to comment Share on other sites More sharing options...
Zodler 18 Posted February 2, 2019 Share Posted February 2, 2019 (edited) I would like to also add that this will be a very useful feature. Is this currently possible with a plugin or something? I want to add a script where a deleted item is replaced by a zero size file with extension seen. example s01e01 episode1.mkv 100MB s01e02 episode2.mkv 100MB after you watch episode 1 and delete through server, I want to have s01e01 episode1.seen 0MB s01e02 episode2.mkv 100MB Edited February 2, 2019 by Zodler Link to comment Share on other sites More sharing options...
Carlo 4330 Posted February 4, 2019 Share Posted February 4, 2019 I could see this being useful as asked by the OP but run the script FIRST before taking the action. So for example Emby would call a listed script and it would run, then the action such as DELETE is done. In this way you can setup a simple script to archive the file before Emby actually deleted it. This type of EVENT SCRIPT would be useful for any action that could be destructively done by a user. Link to comment Share on other sites More sharing options...
Luke 37007 Posted February 4, 2019 Share Posted February 4, 2019 A plugin could provide this feature. 1 Link to comment Share on other sites More sharing options...
chef 3745 Posted February 4, 2019 Share Posted February 4, 2019 You lead Devs are tricky... tricky. Plugin Architecture has changed again. No more showing <script> tags in html to call the corresponding js files. instead, you are using "__plugin/" in a data-controller attribute. I think.... I hope.... Link to comment Share on other sites More sharing options...
chef 3745 Posted February 4, 2019 Share Posted February 4, 2019 Okay, fellas. This is what I got so far. 2 Link to comment Share on other sites More sharing options...
chef 3745 Posted February 4, 2019 Share Posted February 4, 2019 Okay, got the UI working... Finally... Geesh... Next is to wire up the backend. I hope process.start works in .netcore... Link to comment Share on other sites More sharing options...
Zodler 18 Posted February 9, 2019 Share Posted February 9, 2019 Just downloaded and added this plugin. Before I can write scripts, this only works for 4 events, right? Playback Started, Stopped, Session Started, Updated? In that case, it is not useful for me. Can you add something for deletion? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now