wrolpi/modules/torrents/test
lrnselfreliance d6a8363903
Torrents: refuse to download into the media directory itself (#1038)
* Torrents: refuse to download into the media directory itself

A torrent's files are chosen by whoever made it. Saved in the media
directory itself, a torrent holding a config directory would put its
files in WROLPi's config directory. Downloads now need a directory in
the media directory. Share still seeds a top-level directory from the
media directory: its files are the shared directory's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Torrents: refuse a WebUI save path WROLPi would refuse

A torrent added in qBittorrent's WebUI to the media directory itself (or
outside the library) is removed from qBittorrent, its files kept, and a
"Torrent Refused" event says why. A torrent moved there in the WebUI is
moved back to its config's save path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Torrents: keep an untagged WROLPi torrent; refuse a WebUI download path

A WROLPi torrent whose tag was removed in the WebUI was removed from
qBittorrent when its save path was refused, and forgotten (config and
.torrent deleted) on the next pass. It is now tagged again and kept as
the config says, as adopt() did before.

qBittorrent keeps a downloading torrent's incomplete files in its
download path, which the WebUI can set per torrent. A WebUI torrent with
a refused download path is removed (files kept); a WROLPi torrent's is
set back to its save path. A finished torrent's download path is unused,
and left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-30 15:05:52 -07:00
..
__init__.py Torrents over a fail-closed VPN (#1026) 2026-11-28 14:26:24 -07:00
test_adding.py Torrents: refuse to download into the media directory itself (#1038) 2026-11-30 15:05:52 -07:00
test_share.py Torrents: refuse to download into the media directory itself (#1038) 2026-11-30 15:05:52 -07:00
test_torrents.py Torrents: refuse to download into the media directory itself (#1038) 2026-11-30 15:05:52 -07:00