This commit is contained in:
cangui 2025-06-19 21:12:05 +02:00
parent 5cf0344b23
commit 6aaa2f6e42

View File

@ -311,11 +311,11 @@ func HandleAddJob(db *gorm.DB) http.HandlerFunc {
for _, l := range links { for _, l := range links {
log.Printf("[l'id] : %v\n", l.ID) log.Printf("[l'id] : %v\n", l.ID)
streamInfo, err := client.CreateTranscode(ctx,l.ID) // streamInfo, err := client.CreateTranscode(ctx,l.ID)
if err != nil { // if err != nil {
log.Println("Erreur GetTranscode:", err) // log.Println("Erreur GetTranscode:", err)
return // return
} // }
job := &download.DownloadJob{ job := &download.DownloadJob{
ID: l.ID, ID: l.ID,
@ -326,7 +326,7 @@ func HandleAddJob(db *gorm.DB) http.HandlerFunc {
Size: l.Size, Size: l.Size,
Host: l.Host, Host: l.Host,
Progress: 0, // obligatoire si valeur attendue Progress: 0, // obligatoire si valeur attendue
StreamURL: streamInfo.StreamURL, // vide par défaut StreamURL: "", // vide par défaut
} }
if err := download.RegisterJobWithDB(job, db); err != nil { if err := download.RegisterJobWithDB(job, db); err != nil {
log.Printf("[ERROR] Job non enregistré : %v\n", err) log.Printf("[ERROR] Job non enregistré : %v\n", err)