Web UI: refresh live torrents often
This commit is contained in:
parent
2d43f41664
commit
dd355b0a74
2 changed files with 1 additions and 5 deletions
|
|
@ -314,16 +314,12 @@ const Torrent: React.FC<{
|
||||||
useEffect(() => customSetInterval((async () => {
|
useEffect(() => customSetInterval((async () => {
|
||||||
const errorInterval = 10000;
|
const errorInterval = 10000;
|
||||||
const liveInterval = 1000;
|
const liveInterval = 1000;
|
||||||
const finishedInterval = 10000;
|
|
||||||
const nonLiveInterval = 10000;
|
const nonLiveInterval = 10000;
|
||||||
|
|
||||||
return API.getTorrentStats(torrent.id).then((stats) => {
|
return API.getTorrentStats(torrent.id).then((stats) => {
|
||||||
updateStatsResponse(stats);
|
updateStatsResponse(stats);
|
||||||
return stats;
|
return stats;
|
||||||
}).then((stats) => {
|
}).then((stats) => {
|
||||||
if (stats.finished) {
|
|
||||||
return finishedInterval;
|
|
||||||
}
|
|
||||||
if (stats.state == STATE_INITIALIZING || stats.state == STATE_LIVE) {
|
if (stats.state == STATE_INITIALIZING || stats.state == STATE_LIVE) {
|
||||||
return liveInterval;
|
return liveInterval;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -163,7 +163,7 @@ async fn start_session() {
|
||||||
"http api",
|
"http api",
|
||||||
error_span!("http_api"),
|
error_span!("http_api"),
|
||||||
librqbit::http_api::HttpApi::new(session, Some(rust_log_reload_tx))
|
librqbit::http_api::HttpApi::new(session, Some(rust_log_reload_tx))
|
||||||
.make_http_api_and_run("127.0.0.1:3000".parse().unwrap(), false),
|
.make_http_api_and_run("127.0.0.1:3030".parse().unwrap(), false),
|
||||||
);
|
);
|
||||||
|
|
||||||
tauri::Builder::default()
|
tauri::Builder::default()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue