Hi,
I uploaded 3 scripts on github that I made.
UnRar.sh is to be used with deluge Execute plugin. It unrar files after download finishes
CleanupRar.sh is to be used with Sonarr/Radarr. It delete unrared files after rename
CleanupMovies.sh is to be used as cron or manually. It clearn all non video files from a movies directory.
Unrar et CleanupRAR has been tested with torrents from Torrentleech and IPTorrents, they may not work correctly with other provider.