Seed after *arr imports - Automatic hardlink/reflinking on move #24329
epheterson
started this conversation in
Ideas
Replies: 1 comment
-
|
Repo is live: https://github.com/epheterson/relinkarr Solution was more elegant than I expected, and it's aligned well with the *arr stack. Would be great for some seasoned devs to take a look and give any feedback. Either way, it's working great on my setup saving space automatically! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I built a small tool that solves a long-standing pain point in the *arr + qBittorrent workflow: continuing to seed after Sonarr/Radarr moves your files, without duplicating disk space.
The problem
When Sonarr/Radarr imports a completed download, you have two bad options:
Sonarr's built-in hardlink support creates the link at the destination (media library → download dir), which means the download dir copy is the "real" one and can't be cleaned up while seeding.
This problem has been discussed many times:
Tools like qbt-file-matcher handle the manual case (rename files in qBit after you've reorganized), but don't automate the *arr import flow.
The approach: relinkarr
Instead of modifying qBittorrent internals, this runs as a sidecar container that:
cp --reflink=always) for cross-subvolume setups (common on Synology NAS where each shared folder is a separate Btrfs subvolume) — also zero additional diskWhen you're done seeding and delete the torrent with files, only the hardlink/reflink is removed. The media library copy is untouched.
Where it stands
This whole thing has been built with Claude Code, mostly voice dictation so far, from the initial idea through the working prototype, NAS testing, and yes, it also wrote this post, with me. The code works (connects to qBit, tracks files, detects moves, matches by inode/size, creates hardlinks with reflink fallback), but I've only tested it on my own Synology setup and hit the cross-subvolume Docker mount issue that I'm sure others would run into too. It'll be fleshed out, tested, reviewed and maintained but all me and my AI, it'd be cool to work with collaborators who have contributed to qBit/libtorrent and do this right.
Questions
rename_file()— a native "follow the file" feature that watches for moves and updates the internal mapping would be cleaner than an external sidecar. Would anyone want to collaborate on that, or is the standalone tool the right call?Once it's more polished I'll put up a repo and update with a link.
References:
Beta Was this translation helpful? Give feedback.
All reactions