Add callback URL for post-processing

This commit is contained in:
Mukhtar Akere
2025-08-27 13:02:43 +01:00
parent 267cc2d32b
commit 83058489b6
8 changed files with 80 additions and 94 deletions

View File

@@ -7,6 +7,7 @@ import (
"encoding/json"
"fmt"
"github.com/google/uuid"
"github.com/sirrobot01/decypharr/internal/config"
"github.com/sirrobot01/decypharr/internal/request"
"github.com/sirrobot01/decypharr/internal/utils"
"github.com/sirrobot01/decypharr/pkg/arr"
@@ -43,6 +44,8 @@ type ImportRequest struct {
}
func NewImportRequest(debrid string, downloadFolder string, magnet *utils.Magnet, arr *arr.Arr, action string, downloadUncached bool, callBackUrl string, importType ImportType) *ImportRequest {
cfg := config.Get()
callBackUrl = cmp.Or(callBackUrl, cfg.CallbackURL)
return &ImportRequest{
Id: uuid.New().String(),
Status: "started",