Built a daemon in Gleam to fix the most annoying thing about my arr stack
Every time Sonarr renames a file, qBittorrent loses it and stops seeding. I know the hardlink workaround, but it breaks the moment your downloads and media are on different volumes.
So I spent a few weekends building arr-sync — a daemon that watches your media folders and automatically resyncs qBittorrent when a file moves or gets renamed. Matching is done via BitTorrent piece hashes, not filenames, so it actually works.
Wrote it in Gleam mostly because I wanted to learn it, and honestly the OTP supervision tree was perfect for this kind of long-running process. Had to write a couple Erlang FFI shims for the filesystem watcher and the piece hasher but nothing crazy.
Still some rough edges (pure v2 BitTorrent torrents can't be matched, qBittorrent bug), documented in the README.
https://github.com/Chahine-tech/daemon
Happy to answer questions, especially around the Gleam/OTP bits since that was the most interesting part to figure out.