This commit is contained in:
cangui 2025-08-18 21:26:33 +02:00
parent e3887bef74
commit 0f21d346a5

View File

@ -54,11 +54,21 @@ func HandleAddJobsMultiple(db *gorm.DB) gin.HandlerFunc {
} }
// 2. Vérification du dossier principal // 2. Vérification du dossier principal
var basePath models.PathDownload var paths []models.PathDownload
if err := db.First(&basePath, baseID).Error; err != nil { if err := db.Find(&paths).Error; err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": "Dossier principal introuvable"}) log.Printf("[DEBUG] Erreur lors du Find: %v", err)
return } else {
} log.Printf("[DEBUG] Contenu de la table PathDownload avant recherche: %+v", paths)
}
var basePath models.PathDownload
if err := db.First(&basePath, baseID).Error; err != nil {
log.Printf("[DEBUG] Pas trouvé baseID=%v dans PathDownload", baseID)
c.JSON(http.StatusBadRequest, gin.H{"error": "Dossier principal introuvable"})
return
}
log.Printf("[DEBUG] PathDownload trouvé pour baseID=%v: %+v", baseID, basePath)
// 3. Initialisation Debrid-Link // 3. Initialisation Debrid-Link
ctx := context.Background() ctx := context.Background()