Run custom scripts (Connection)

So much happiness when I read this! :smiley: Custom notification stuff here I come.
Then I took a look at the input fields, the code, the input fields again, the code again, and I couldnā€™t figure out.

Could you give an example of the data that sonarr passes to the script?

Forgot to update the wiki when we released that:

Iā€™ll need to update it with the arguments for other scenarios, but the parameters are the same.

1 Like

Thanks. :slight_smile: Is there an ā€˜event typeā€™ for ā€˜new series addedā€™? Thatā€™s one Iā€™d make heavy use of.

Need to rearrange my set up so I have one download dir for all tv stuff, then use symlinks for plex to have diff libraries for all the ppl I share with.

But right now Iā€™d have to manually create the symlinks when new series is added. With this, I wouldnā€™t have to as long as it could call multiple scripts for multiple tags.

Thus Script/tag for Me, Children 1-5 each have their own, Wife has one, and several friends.

Heh, doing something a bit similar myself. Iā€™m taking a stab at ā€œif symlink doesnā€™t exist, create itā€ when the Download/Rename events are sent to my script.

@markus101: can tags be included in the environment variables (e.g. Series.Tags)? Like a comma-separated list or something, which a script can then parse further to take different actions depending on the seriesā€™ tag(s).

Iā€™m ok w/ manually setting up whatā€™s already there now, as thatā€™s a one time thing. But when adding stuff in the future . . .

ooohhh

Just had another idea - if I ADD a tag, can it call a script too? And again process multiple tags? That would mean I wouldnā€™t have to manually do anything but add tags. :slight_smile:

9 times out of 10, adding a tag to a series coincides with adding the series itself, no? E.g. the wife or kids asking you to acquire series x or y for them.

So youā€™ll have a new series and e.g. tag it with ā€œwifeā€, and then youā€™ll start searching for it.
If tags are passed along to the custom script when something is downloaded, you can immediately act on them and if required do the one-time setup thingy like create a symlinkā€¦

(Crossing fingers that adding tags to the environment variables is a small thing to ask ;))

While true, sometimes a friend will ask me to add a series, but Iā€™ve already got it. So if I just add their tag to it, then the symlink can be made for them via script.

And right now, Iā€™m not using tags heavily b/c they donā€™t have a lot of use for individual users. Plus they didnā€™t exist when I set up sonarr in the first place, so thereā€™s a lot of series that have none.

Ah yes, makes sense.


Also, Iā€™m dumb. Disregard this request please, devs:

There is a ā€œFilter Series Tagsā€ field when setting up the connection, which I completely overlooked :expressionless:

If you get it figured out, please post.

I need a LOT more documentation b/c while I follow the logic, I suck at actually building such things.

EDIT: also, lets not forget delete symlinks when tags are removed, or series is removed. :slight_smile:

Agreed. Iā€™m interesting in using this to possibly do Subtitle renames to match the new name sonarr has. I havenā€™t seen a location to put a script, etc. in though! :stuck_out_tongue:

LJ

Very happy to see this. i switch to sonarr not a long time ago. (from sickbeard). I used to call a script to do some stuff around subtitle.Base on the example I created an equivalent scrip(to call some software) but I did not find where to put the script or how to configure it in Sonarr

thanks for this option btw

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