Add category filtering, default to copy mode, split dev/prod compose

- Default MOVE_MODE changed to copy so qBit can continue seeding
- Add QBIT_CATEGORY env var (default "Stash") to filter torrents
- Split compose into dev (build from source) and prod (pre-built image)
- Fix Dockerfile COPY glob needing trailing slash
- Update README and summary docs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-16 11:38:17 -05:00
parent f09d94e34b
commit 6adfd77236
7 changed files with 59 additions and 17 deletions
+19 -6
View File
@@ -1,6 +1,6 @@
# StashHandler
A Docker service that bridges qBittorrent and Stash. It polls qBittorrent for completed torrents, hashes media files, deduplicates them against a SQLite database, and moves new files into Stash's import directory.
A Docker service that bridges qBittorrent and Stash. It polls qBittorrent for completed torrents (filtered by category), hashes media files, deduplicates them against a SQLite database, and copies new files into Stash's import directory — preserving originals so seeding can continue.
## Why
@@ -10,18 +10,30 @@ A Docker service that bridges qBittorrent and Stash. It polls qBittorrent for co
## Quick Start
1. Clone this repo
2. Configure environment variables in `docker-compose.yaml` (or via your swarm/stack config)
3. Deploy:
### Development
```bash
# Docker Compose
git clone <repo-url> && cd stashhandler
# Edit environment variables in docker-compose.yaml
docker compose up -d --build
```
### Production
```bash
# Copy the example and fill in your values
cp docker-compose.prod.example.yaml docker-compose.yaml
# Edit QBIT_PASSWORD, volume paths, etc.
# Docker Swarm
docker stack deploy -c docker-compose.yaml stash-handler
# Or plain Compose
docker compose up -d
```
The prod compose pulls the pre-built image from `git.fabledsword.com/bvandeusen/stashhandler:latest` and only includes the stash-handler service (qBittorrent and Stash are managed separately).
## Modes
### Daemon (default)
@@ -62,7 +74,8 @@ All configuration is via environment variables. No config files needed — works
| `POLL_INTERVAL` | `60` | Seconds between polls |
| `MEDIA_EXTENSIONS` | `.mp4,.mkv,.avi,.wmv,.mov,.webm,.flv,.m4v` | Comma-separated extensions |
| `HASH_ALGORITHM` | `sha256` | `sha256` or `blake3` |
| `MOVE_MODE` | `move` | `move`, `hardlink`, or `copy` |
| `MOVE_MODE` | `copy` | `copy`, `hardlink`, or `move` |
| `QBIT_CATEGORY` | `Stash` | qBit category to filter torrents by |
| `LOG_LEVEL` | `INFO` | Python log level |
## Volumes