Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Commit

Permalink
bug fixes for 1.6 beta
Browse files Browse the repository at this point in the history
  • Loading branch information
itsToggle authored Oct 5, 2022
1 parent 05de890 commit 4f9f01f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion backend/realdebrid/realdebrid.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,20 @@ func (f *Fs) redownloadTorrent(ctx context.Context, torrent api.Item) (redownloa
Parameters: f.baseParams(),
}
_, _ = f.srv.CallJSON(ctx, &opts, nil, &torrent)
time.Sleep(time.Duration(1) * time.Second)
method = "GET"
path = "/torrents/info/" + torrent.ID
opts = rest.Opts{
Method: method,
Path: path,
Parameters: f.baseParams(),
}
_, _ = f.srv.CallJSON(ctx, &opts, nil, &torrent)
var tries = 0
for torrent.Status != "waiting_files_selection" && tries < 5 {
time.Sleep(time.Duration(1) * time.Second)
_, _ = f.srv.CallJSON(ctx, &opts, nil, &torrent)
tries += 1
}
//Select the same files again
path = "/torrents/selectFiles/" + torrent.ID
method = "POST"
Expand Down

0 comments on commit 4f9f01f

Please sign in to comment.