Automatically delete or move extracted files once they are imported by Sonarr or Radarr
Python 2 and 3 script to delete or move extracted files. Use this as a Custom Script in Sonarr and Radarr. When a download is imported this script will get the torrent details from the download ID using the Deluge API. If it finds the torrent and the files list does not contain the imported file name (but contains archived files) then the script will delete or move the file.
- deluge_url
- json api endpoint for deluge web service
- deluge_password
- password to log into deluge gui
- move_extraced_to
- if you want to move files instead of delete set this to the full destination path
- to delete extracted files set to
None
Setup the lcextractor_cleanup.py script via Settings > Connect > Connections > + (Add)
name
- lcextractor_cleanupOn Grab
- NoOn Download
- YesOn Upgrade
- YesOn Rename
- No- Filter Series Tags - optional
- Windows Users
Path
- Full path to your python executableArguments
- Full path tolcextractor_cleanup.py
- Nonwindows Users
- Ensure script is executable and set correct shebang for your environment
Path
- Full path tolcextractor_cleanup.py
Arguments
- Leave blank
Setup the lcextractor_cleanup.py script via Settings > Connect > Connections > + (Add)
name
- lcextractor_cleanupOn Grab
- NoOn Download
- YesOn Upgrade
- YesOn Rename
- No- Filter Series Tags - optional
- Windows Users
Path
- Full path to your python executableArguments
- Full path tolcextractor_cleanup.py
AND"radarr"
- Nonwindows Users
- Ensure script is executable and set correct shebang for your environment
Path
- Full path tolcextractor_cleanup.py
Arguments
-"radarr"