Skip to content

Instantly share code, notes, and snippets.

View smp's full-sized avatar
🎥
Making video work on the web

Shawn Przybilla smp

🎥
Making video work on the web
View GitHub Profile
@smp
smp / torrent-complete.sh
Created October 28, 2021 17:22 — forked from paul-chambers/torrent-complete
Helper script for deluge. It hardlinks completed torrents into a destination folder (or unrars it directly into the destination, if appropriate)
#!/bin/bash
# Helper script for the Deluge torrent client
# Intended to be run at torrent completion, using the 'torrent complete' event in the 'Execute' plugin.
#
# The basic idea is to hardlink the files that deluge has just finished downloading to a second directory.
# This allows you to configure deluge to automatically pause or delete torrents when they reach a given seed ratio,
# while also keeping a copy around for other reasons. For example, SyncThing could be used to propagate new downloads
# to a remote machine to be processed further. When processing has finished, and the file is deleted/moved out of the
# Syncthing folder, the remote Syncthing will propagate a deletion back to the original Synchting (on the machine