Howto: fix broken funscripts with stash/stashapp

The problem was stated here:

And a manual solution given (invalid value for range, change it from 90 to 100):

Here’s a script to do it en masse to an entire folder:

find $FOLDER -type f -name '*.funscript' -exec perl -pi -e 's/"range":\s*90/"range":100/s' {} \;

where $FOLDER could be replaced with “.” or set explicitly, e.g.

export FOLDER=/some/path
4 Likes

Would you be willing to give a bit more instruction on how to use this? Using PS with either “.” or manually pointing to the folder with the script always gives a “FIND: Parameter format not correct” error

Thanks so much for making and posting this fix too, it’s been driving me nuts!

1 Like

not quite sure about the use of the command, but if you have notepad++ you can use its Find and replace function to do it en masse in files
image

3 Likes

This worked perfectly, thanks so much!

1 Like

i will add to this, that Find term only fixes stuff thats set to range 90
if you need to fix everything(ish) in 1 go then: \“range\”: {0,1}[2-9][0-9]
this will fix everything in range 20-99

1 Like

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