diff --git a/pkg/debrid/providers/torbox/torbox.go b/pkg/debrid/providers/torbox/torbox.go index b246371..64af4c5 100644 --- a/pkg/debrid/providers/torbox/torbox.go +++ b/pkg/debrid/providers/torbox/torbox.go @@ -171,9 +171,17 @@ func (tb *Torbox) SubmitMagnet(torrent *types.Torrent) (*types.Torrent, error) { } func (tb *Torbox) getTorboxStatus(status string, finished bool) string { + // Log raw values for debugging + tb.logger.Debug(). + Str("download_state", status). + Bool("download_finished", finished). + Msg("getTorboxStatus called") + // For cached/completed torrents, content is immediately available even if // DownloadFinished=false (no download actually happened - it was already cached) - if finished || status == "cached" || status == "completed" { + // Use case-insensitive comparison for safety + statusLower := strings.ToLower(status) + if finished || statusLower == "cached" || statusLower == "completed" { return "downloaded" } downloading := []string{"paused", "downloading", "uploading",