Skip to content

Commit

Permalink
Web UI: refresh live torrents often
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatson committed Dec 6, 2023
1 parent 2d43f41 commit dd355b0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions crates/librqbit/webui/src/rqbit-web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion desktop/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit dd355b0

Please sign in to comment.