Fix arr download_uncached settings

This commit is contained in:
Mukhtar Akere
2025-03-16 05:43:25 +01:00
parent b91aa1db38
commit 26f6f384a3
10 changed files with 45 additions and 19 deletions

View File

@@ -249,12 +249,9 @@ func (r *RealDebrid) CheckStatus(t *torrent.Torrent, isSymlink bool) (*torrent.T
}
break
} else if slices.Contains(r.GetDownloadingStatus(), status) {
if !r.DownloadUncached && !t.DownloadUncached {
if !t.DownloadUncached {
return t, fmt.Errorf("torrent: %s not cached", t.Name)
}
// Break out of the loop if the torrent is downloading.
// This is necessary to prevent infinite loop since we moved to sync downloading and async processing
break
} else {
return t, fmt.Errorf("torrent: %s has error: %s", t.Name, status)
}
@@ -384,6 +381,10 @@ func (r *RealDebrid) GetDownloadingStatus() []string {
return []string{"downloading", "magnet_conversion", "queued", "compressing", "uploading"}
}
func (r *RealDebrid) GetDownloadUncached() bool {
return r.DownloadUncached
}
func New(dc config.Debrid, cache *cache.Cache) *RealDebrid {
rl := request.ParseRateLimit(dc.RateLimit)
headers := map[string]string{