I’m having some issues getting Sonarr to show results when running a test post-rename script. It’s python:
I’d like to have it tell me after a file is renamed, what the file is (IE: it downloads, then gives me the new name). However, this doesn’t seem to work for renames, only downloads:
import os
import sys
import logging
logging.basicConfig(filename=‘c:\example.log’,level=logging.DEBUG) logging.info(os.environ.get(‘sonarr_episodefile_path’))
On Download is triggered after the file is imported, On Rename is triggered when 1 or more existing episodes is renamed.
I think this would only be possible if its a torrent and the files were copied/hard linked, for non-seeding torrents/nzbs the folder would have been cleaned up by the time this event triggered (though I’m second guessing this now, so you may be in luck).
Thanks for the insights!! I got the script moving subtitles now when the download completes. I’ll post my scripts so others can utilize as well after I test a little more.