AnthonyMusgrove / Emby-ScripterX

Run custom external application or script (batch/bash/powershell/php/python/node.js/custom) on various events within the Emby Server.
https://emby-scripterx.com
76 stars 6 forks source link

Allow actions to run executables on Linux #30

Closed Slugger closed 4 years ago

Slugger commented 4 years ago

Is your feature request related to a problem? Please describe. When defining an action, I must include an interpreter. What if I want to run an executable? I'd rather not have to wrap executables around a bash script.

Describe the solution you'd like Allow actions to run executables

Describe alternatives you've considered Wrapping exe calls in a bash script, but just seems like an unnecessary extra layer

Additional context If I have some exe that I want to run, I should be able to (i.e. if the execute bit is set, let me just run it). Additionally, I could just set the exe bit on a shell script and not have to invoke it thru an interpreter. This way I don't have to modify my actions if I do change the interpreter of an action script (an example might be a python2 script ported to python3, now I have to remember to update the action definition after I port the script). Yes, this would be rare, but definitely would be nice. I could see myself writing some C code, for example, and I really don't want to have to wrap that in shell script in order to invoke it in an action.

AnthonyMusgrove commented 4 years ago

I absolutely agree here, so the way we could achieve this is by using 'Interpreter' as any interpreter or executable file, and make the 'Script' field optional. So instead of specifying cmd, etc, you'll be able to specify your executable file (which you can now, but it currently calls in the format of Run (interpreter) + script file [parameters], I can modify this tonight!

AnthonyMusgrove commented 4 years ago

This one is now completed in v3.0.3.3 - please update from the Emby Plugin catalog;