Skip to content

Instantly share code, notes, and snippets.

@BlindByrd
BlindByrd / sonarr_cleanup_packed_torrent.sh
Last active February 14, 2022 15:15 — forked from fryfrog/sonarr_cleanup_packed_torrent.sh
Sonarr post processing script to remove video file from packed torrent, modified version of subzero79/87a347a07964390884c9
#!/bin/bash
# Setup in Sonarr: Settings -> Connect -> Add Custom Script, enable Download and Upgrade (or Import and Upgrade in v3)
# Examples for testing
# sonarr_episodefile_sourcefolder="/data/torrent/tv/Penny.Dreadful.S01E01.720p.HDTV.x264-2HD" sonarr_episodefile_sourcepath="/data/torrent/tv/Penny.Dreadful.S01E01.720p.HDTV.x264-2HD/penny.dreadful.s01e01.720p.hdtv.x264-2hd.mkv"
# The final base directory torrents end up in, for example "tv" from /data/torrents/tv
sonarr_final_dir="Complete"
# Identifiable portion of path to torrents, so it will only run on torrents.