feat: gestion des téléchargements qBittorrent avec import automatique

- Nouvelle table `torrent_downloads` pour suivre les téléchargements gérés
- API : endpoint POST /torrent-downloads/notify (webhook optionnel) et GET /torrent-downloads
- Poller background toutes les 30s qui interroge qBittorrent pour détecter
  les torrents terminés — aucune config "run external program" nécessaire
- Import automatique : déplacement des fichiers vers la série cible,
  renommage selon le pattern existant (détection de la largeur des digits),
  support packs multi-volumes, scan job déclenché après import
- Page /downloads dans le backoffice : filtres, auto-refresh, carte par download
- Toggle auto-import intégré dans la card qBittorrent des settings
- Erreurs de détection download affichées dans le détail des jobs
- Volume /downloads monté dans docker-compose

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-26 14:43:10 +01:00
parent a2de2e1601
commit 4bb142d1dd
21 changed files with 1197 additions and 39 deletions

View File

@@ -70,6 +70,15 @@ LIBRARIES_HOST_PATH=./libraries
# Default: ../data/thumbnails (relative to infra/docker-compose.yml)
THUMBNAILS_HOST_PATH=./data/thumbnails
# Path to qBittorrent downloads directory on host machine (for Docker volume mount)
# The container will see this as /downloads
DOWNLOADS_HOST_PATH=./data/downloads
# Path to downloads directory inside the container (for dev remapping, like LIBRARIES_ROOT_PATH)
# In Docker: leave as default /downloads
# For local dev: set to your local downloads folder path
# DOWNLOADS_PATH=/downloads
# =============================================================================
# Port Configuration
# =============================================================================