Improve streaming

This commit is contained in:
Mukhtar Akere
2025-03-23 09:32:19 +01:00
parent e2f792d5ab
commit 8c13da5d30
2 changed files with 13 additions and 35 deletions

View File

@@ -357,6 +357,10 @@ func (r *RealDebrid) getTorrents(offset int, limit int) (int, []*types.Torrent,
return 0, torrents, err
}
if resp.StatusCode == http.StatusNoContent {
return 0, torrents, nil
}
if resp.StatusCode != http.StatusOK {
resp.Body.Close()
return 0, torrents, fmt.Errorf("realdebrid API error: %d", resp.StatusCode)