girkers

Entry Technician
Q Associate
11 Marzec 2019
12
1
35
Odznaki
12
Australia
QNAP
TS-x69 Pro
Ethernet
1 GbE
Poz.
1
 
In r15 when you added a torrent into the watch folder, once it was added to rTorrent the .torrent would automatically delete.

This does not occur in r16, could we please has this back, or at least an option to have it delete them. I am not aware of any reason of need to keep the original .torrent file.

Thanks
 
Short answer: r16’s rTorrent build no longer removes the original .torrent files from the watch directory automatically (this behaviour changed compared to r15). You can restore the practical effect (remove .torrent files after they’ve been picked up) by either enabling and properly configuring the built-in Autotools (for moving/processing) and then removing .torrent files via a small cleanup script, or by using a tiny post‑import script triggered by filesystem events. Below are exact, safe options and ready-to-use examples.

Why this happens
- From the forum fragments: Autotools controls watch/complete behaviour (AutoWatch, AutoMove, AutoLabel, etc.). The UI options shown in the rTorrent-Pro advanced UI do not include an explicit “auto-delete torrent file” checkbox in the provided fragments. That implies the older automatic deletion you relied on was removed or disabled in r16 builds; therefore Autotools alone may not remove the .torrent file anymore.

Options to get the same result

Option A — Preferred: keep Autotools enabled and run a small cleanup job that deletes .torrent files a short time after they appear
1) In rTorrent-Pro UI (rtorrent-Pro at http://nas_ip:6009 or https://nas_ip:6008) open Advanced UI → Settings icon → Autotools.
2) Make sure Autotools is enabled and configured:
- AutoWatch: yes
- Path to base watch directory: /share/Rdownload/watch (adjust to your real path)
- AutoMove: yes
- Path to finished downloads: /share/Rdownload/complete
- Start download automatically: yes
- Operation type: Hard link (if you want hard links)
3) Use a cleanup script on the NAS to remove .torrent files that are older than, say, 5 minutes (gives rTorrent time to pick them up). Create and test carefully; always test on a non-production folder first.

Example cron job (runs every 5 minutes) — removes .torrent files older than 5 minutes:
Bash:
# create a script /opt/scripts/cleanup_torrents.sh
#!/bin/sh
WATCH_DIR="/share/Rdownload/watch"
find "$WATCH_DIR" -type f -iname "*.torrent" -mmin +5 -exec rm -f {} \;

Then make the script executable and add to crontab (example runs every 5 minutes):
Bash:
chmod +x /opt/scripts/cleanup_torrents.sh
# crontab entry (edit with crontab -e)
*/5 * * * * /opt/scripts/cleanup_torrents.sh >/dev/null 2>&1

Notes for Option A:
  • Adjust WATCH_DIR and age (+5 minutes) to suit your environment.
  • This is simple, robust and does not rely on rTorrent internals.
  • Test with a safe file and confirm rTorrent picks up the torrent before it’s deleted.

Option B — event-driven removal (faster, more real-time)
If your QNAP has inotify tools available, use inotifywait to remove the .torrent immediately after it’s moved/processed. This is slightly more complex and may require entware/ipkg or a package that provides inotify-tools.

Example watcher script:
Bash:
#!/bin/sh
WATCH_DIR="/share/Rdownload/watch"
inotifywait -m -e CLOSE_WRITE --format '%w%f' "$WATCH_DIR" | while read FILE; do
  case "$FILE" in
    *.torrent)
      # small delay to ensure rTorrent picked it up, optional
      sleep 3
      rm -f "$FILE"
      ;;
  esac
done

Notes:
  • inotify approach removes torrents immediately after they are closed/written; if rTorrent needs a few moments to pick them up, a short sleep can help.
  • Ensure the script runs under a user with permissions to the watch directory.

Option C — if Autotools supports a post‑process hook in your r16 build
- Check Advanced UI → Autotools for any “post-processing” or user command hook. If present, you could point it to a script that deletes the .torrent after successful import. The forum fragments do not show such an option, so this may not exist in r16 — prefer Options A or B.

Safety and practical tips
  • Always test scripts on a non‑critical watch folder first. Do not point deletion scripts at production directories until confirmed.
  • Keep a backup of any .torrent files you might need (if you rely on them for re-adding torrents).
  • Use short delays (5 minutes or a few seconds for inotify) to avoid deleting a torrent before rtorrent picks it up.
  • If you run multiple users or multiple rTorrent instances, ensure the cleanup script targets only the intended watch path and user context.
  • If you change the watch path, update the script accordingly.

Summary (actionable)
1) Enable Autotools and verify AutoWatch/AutoMove settings in rtorrent-Pro Advanced UI.
2) Deploy the simple cron cleanup (recommended) or inotify watcher script to delete .torrent files shortly after they appear.
3) Test thoroughly on a non-production folder, then switch to your real watch folder.

That will replicate the r15 behaviour (automatic removal of the .torrent file) reliably in r16 without relying on a removed built‑in feature.

Źródła na forum:

Ta wiadomość pochodzi od asystenta AI — może zawierać błędy, zweryfikuj przed zastosowaniem. Oceń ją, głosując pod postem: ▲ pomocna lub ▼ nieprzydatna.
Na tym forum nie ma złych ocen — wszyscy wciąż się uczymy i wszyscy jesteśmy adminami, a +1 czy −1 to zawsze tylko 1 punkt. Każde Twoje kolejne pytanie to wspólna pomoc, która zostaje nie tylko na forum, ale i w internecie. Społeczność forum QNAP działa od 2008 roku i po niemal dwóch dekadach nieprzerwanie dostarcza rzetelne treści, z których korzystają kolejni admini — a ostatnio uczy się na nich także AI.