Add a button to increase peer timeouts
This commit is contained in:
parent
dc50de31dc
commit
a0feee27a6
6 changed files with 61 additions and 28 deletions
|
|
@ -147,7 +147,7 @@ export const API = {
|
|||
},
|
||||
|
||||
uploadTorrent: (data: string | File, opts?: {
|
||||
listOnly?: boolean, selectedFiles?: Array<number>
|
||||
listOnly?: boolean, selectedFiles?: Array<number>, unpopularTorrent?: boolean,
|
||||
}): Promise<AddTorrentResponse> => {
|
||||
opts = opts || {};
|
||||
let url = '/torrents?&overwrite=true';
|
||||
|
|
@ -157,6 +157,9 @@ export const API = {
|
|||
if (opts.selectedFiles != null) {
|
||||
url += `&only_files=${opts.selectedFiles.join(',')}`;
|
||||
}
|
||||
if (opts.unpopularTorrent) {
|
||||
url += '&peer_connect_timeout=20&peer_read_write_timeout=60';
|
||||
}
|
||||
return makeRequest('POST', url, data)
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue