12/7/2023 0 Comments Sonarr post processing script![]() I thought that by setting “On Download”: Yes that the script would execute after the download completes regardless of whether Completed Download Handling was enabled, but this behavior makes me think it’s more of an “On Import” trigger. (From reading the instructions to set up the sickbeard_mp4_automator it appeared that the script should run with Completed Download Handling disabled.) If Completed Download Handling is disabled, CustomScript never executes in the logs, even after leaving things alone for hours after the download. Import/barġ7-5-29 22:37:15.9|Debug|DownloadedEpisodesImportService|Deleting folder after importing valid files Import/bar' for video filesġ7-5-29 22:37:15.9|Debug|DiskScanService|0 video files were found in /Users/foo/Movies/Transmission/1. If Completed Download Handling is enabled, the script runs as expected file is imported into Sonarr, script runs: 17-5-29 22:37:15.3|Debug|EpisodeFileMovingService|Moving episode file: /Users/foo/Movies/Transmission/1. usr/bin/env > /Users/foo/Desktop/vars.txt Remove: Yes (also tried No with same results) For this example I’m using a script that just exports the list of environment variables. I’m trying to run a custom script after a download completes but before it is imported (will be passing EpisodeFile_SourcePath to Handbrake for post-download video conversion and passing EpisodeFile_SourceFolder to DownloadedEpisodesScan in the API to import once the script completes). I’ve been experimenting with Sonarr and have been liking what I see so far, but I’ve come across something that I’m not sure if it’s a bug or working as intended. ((Debug logs)): generated only for successful runs (see below) This file has been truncated.Mono version (if Sonarr is not running on Windows): Mono JIT compiler version 5.0.0.100 (2017-02/9667aa6 Fri May 5 09:12:) #sonarr_episodefile_sourcepath="/torrent/finish/tv-sonarr/Penny.x264-2HD/penny.x264-2hd.mkv"īase_dir=$(basename $sonarr_episodefile_sourcefolder) #sonarr_episodefile_sourcefolder="/torrent/finish/tv-sonarr/Penny.x264-2HD" This script was executed by sonarr post processing, after importing the video files. For deleting extracted files I use a bash script that checked for rar files if they were present it deleted the video files. ![]() ![]() I did once had this setup using a vps remote server with CDH and remote path mapping using NFS. Since the source is torrent and sonarr does not handle rars you have to use a custom post processing script to clean the extracted files. I also had the same issue running a different script that would perform the same purpose, however that one was a Shell Script. Finished torrents are being removed automatically by Sonarr, but leaving the extracted file behind. And, Sonarr successfully tests the script in the settings. The “Remove” settings under CDH is enabled. ![]() Or make Deluge delete the entire torrents folder, including the extracted file? Is there a way to make Sonarr move extracted files instead of hardlinking/copying them? The extracted file now remains alone inside inside the torrents folder and I have to delete it manually. Parameters are passed to the script through environment variables (allowing for more flexibility in what we send to the script and not having to worry about a particular order). Now when I decide to delete the episode using Sonarr, only the imported file inside the media folder will be deleted.ĭeleting the torrent (+data) in Deluge will only delete the downloaded files and ignore the extracted. Sonarr can execute a custom script when new episodes are imported or a series is renamed, depending on the which action occurred the parameters will be different. The extracted file still remains inside the torrents subfolder.mkv file and imports it into my media folder (hardlink) There’s just one last issue left which needs to be solved. I’m fairly new to Sonarr and love it so far. ((Debug logs)) (posted to hastebin or similar): Mono version (if Sonarr is not running on Windows): 4.2.1
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |