(2015-12-30, 22:06)Swifty Wrote: Is it possible to use this to prompt for deletion when finishing watching recorded tv?
I have taken a look using the latest addon from KenV99's github and the 'Playback Stopped' doesn't seem to have any selectable arguments that can be sent.
If I could get the media type (recorded tv) and the file path, I figured it should then be easy enough to make a prompt to carry out deletion.
Ideally I'd like to get the playback percentage too (so I only prompt if say >90% duration watched) but I'm guessing I probably can't get that easily..
I can make both of those available in the next version.
I am in the middle of a major rewrite, so it may be a week or so.
The next version is a major overhaul using a threaded PubSub design pattern that will make it easier to add things.
In addition the way arguments is going to be handled will be with a simple script language using variable substitutions.
In the settings you will be given a list of available variables for a given event and the user will input a string to be used when executing the event.
For example for this - %fn = fileName, %pp = percentPlayed.
The user can then customize the order and other arguments that can be passed along with 'static' elements.
Such as:
foo %pp bar:"%fn"
will send:
foo 26 bar:"G:\Movies\Star Wars IV\Star War IV - A New Hope"
%% will be used to send a literal % sign.
To be clear - any non-variable elements like foo and bar will just be copied over.
These will be 'appended' to the actual command that the script is using.
Because of the way arguments are handled for scripts, they will be passed as individual elements after the actual script file.
For python and built-ins, they will be comma-separated.
For http they will be url-encoded.
I hope this will provide more flexibility for users.