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:
@@ -1282,8 +1282,27 @@ export type ProwlarrTestResponse = {
|
||||
export type QBittorrentAddResponse = {
|
||||
success: boolean;
|
||||
message: string;
|
||||
torrent_download_id?: string | null;
|
||||
};
|
||||
|
||||
export type TorrentDownloadDto = {
|
||||
id: string;
|
||||
library_id: string;
|
||||
series_name: string;
|
||||
expected_volumes: number[];
|
||||
qb_hash: string | null;
|
||||
content_path: string | null;
|
||||
status: "downloading" | "completed" | "importing" | "imported" | "error";
|
||||
imported_files: Array<{ volume: number; source: string; destination: string }> | null;
|
||||
error_message: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
|
||||
export async function fetchTorrentDownloads(): Promise<TorrentDownloadDto[]> {
|
||||
return apiFetch<TorrentDownloadDto[]>("/torrent-downloads");
|
||||
}
|
||||
|
||||
export type QBittorrentTestResponse = {
|
||||
success: boolean;
|
||||
message: string;
|
||||
|
||||
Reference in New Issue
Block a user