Web UI: refresh live torrents often

This commit is contained in:
Igor Katson 2023-12-06 12:20:19 +00:00
parent 2d43f41664
commit dd355b0a74
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
2 changed files with 1 additions and 5 deletions

View file

@ -314,16 +314,12 @@ const Torrent: React.FC<{
useEffect(() => customSetInterval((async () => {
const errorInterval = 10000;
const liveInterval = 1000;
const finishedInterval = 10000;
const nonLiveInterval = 10000;
return API.getTorrentStats(torrent.id).then((stats) => {
updateStatsResponse(stats);
return stats;
}).then((stats) => {
if (stats.finished) {
return finishedInterval;
}
if (stats.state == STATE_INITIALIZING || stats.state == STATE_LIVE) {
return liveInterval;
}

View file

@ -163,7 +163,7 @@ async fn start_session() {
"http api",
error_span!("http_api"),
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()