fix download_uncached bug

This commit is contained in:
Mukhtar Akere
2025-10-13 20:37:59 +01:00
parent df7979c430
commit b1b6353fb3

View File

@@ -312,13 +312,9 @@ func Process(ctx context.Context, store *Storage, selectedDebrid string, magnet
// Override first, arr second, debrid third // Override first, arr second, debrid third
if overrideDownloadUncached { if !overrideDownloadUncached && a.DownloadUncached != nil {
debridTorrent.DownloadUncached = true
} else if a.DownloadUncached != nil {
// Arr cached is set // Arr cached is set
debridTorrent.DownloadUncached = *a.DownloadUncached overrideDownloadUncached = *a.DownloadUncached
} else {
debridTorrent.DownloadUncached = false
} }
for _, db := range clients { for _, db := range clients {
@@ -331,8 +327,9 @@ func Process(ctx context.Context, store *Storage, selectedDebrid string, magnet
Str("Action", action). Str("Action", action).
Msg("Processing torrent") Msg("Processing torrent")
if !overrideDownloadUncached && a.DownloadUncached == nil { // If debrid.DownloadUnached is true, it overrides everything
debridTorrent.DownloadUncached = db.GetDownloadUncached() if db.GetDownloadUncached() || overrideDownloadUncached {
debridTorrent.DownloadUncached = true
} }
dbt, err := db.SubmitMagnet(debridTorrent) dbt, err := db.SubmitMagnet(debridTorrent)