diff --git a/TODO.md b/TODO.md index bfaf06c3..2daacd9b 100644 --- a/TODO.md +++ b/TODO.md @@ -3,7 +3,7 @@ - [x (partial)] per-peer stats - [x] use some concurrent hashmap e.g. flurry or dashmap - [x] tracing instead of logging. Debugging peers: RUST_LOG=[{peer=.*}]=debug - test-log for tests + test-log for tests - [x] reopen read only is bugged - [x] initializing/checking - [x] blocks the whole process. Need to break it up. On slower devices (rpi) just hangs for a good while @@ -19,7 +19,6 @@ - [x] for torrents with a few seeds might be cool to re-query DHT once in a while. - [x] don't leak memory when deleting torrents (i.e. remove torrent information (seen peers etc) once the torrent is deleted) - [x] Routing table - is it balanced properly? - - [ ] - [x] Don't query Bad nodes - [-] Buckets that have not been changed in 15 minutes should be "refreshed." (per RFC) - [x] Did it, but it's flawed: starts repeating the same queries again as neighboring refreshes @@ -33,25 +32,31 @@ - [x] Ensure that if we query the "returned" nodes, they are even closer to our request than the responding node id was. incoming peers: + - [x] error managing peer: expected extended handshake, but got Bitfield(<94 bytes>) - [x] do not announce when merely listing the torrent someday: + - [x] cancellation from the client-side for the lib (i.e. stop the torrent manager) - [x] favicons for Web UI desktop: -- [ ] on first run show options -- [ ] allow to change options later (even with a session restart) + +- [x] on first run show options +- [x] allow to change options later (even with a session restart) - [ ] look at logs - allow writing them to files? Set RUST_LOG through API persistence: + - [ ] store total uploaded bytes, so that on restart it comes back up efficiency: + - [ ] once the torrent is completed, we don't need to remember old peers refactor: + - [x] session persistence: should add torrents even if we haven't resolved it yet - [x] where are peers stored - [x] http api pause/unpause etc @@ -61,5 +66,5 @@ refactor: - [x] start from error state should be possible from UI - [x] checking is very slow on raspberry - checked. nothing much can be done here. Even if raspberry's own libssl.so is used it's still super slow (sha1) -- [ ] .rqbit-session.json file has 0 bytes when disk full. I guess fs::rename does this when disk is full? at least on linux. Couldn't repro on MacOS \ No newline at end of file + checked. nothing much can be done here. Even if raspberry's own libssl.so is used it's still super slow (sha1) +- [ ] .rqbit-session.json file has 0 bytes when disk full. I guess fs::rename does this when disk is full? at least on linux. Couldn't repro on MacOS diff --git a/crates/librqbit/src/session.rs b/crates/librqbit/src/session.rs index 3a93459b..5c028dd8 100644 --- a/crates/librqbit/src/session.rs +++ b/crates/librqbit/src/session.rs @@ -203,9 +203,9 @@ fn compute_only_files>( /// Options for adding new torrents to the session. #[serde_as] #[derive(Default, Clone, Serialize, Deserialize)] +#[serde(default)] pub struct AddTorrentOptions { /// Start in paused state. - #[serde(default)] pub paused: bool, /// A regex to only download files matching it. pub only_files_regex: Option, @@ -214,10 +214,8 @@ pub struct AddTorrentOptions { pub only_files: Option>, /// Allow writing on top of existing files, including when resuming a torrent. /// You probably want to set it, however for safety it's not default. - #[serde(default)] pub overwrite: bool, /// Only list the files in the torrent without starting it. - #[serde(default)] pub list_only: bool, /// The output folder for the torrent. If not set, the session's default one will be used. pub output_folder: Option, diff --git a/crates/librqbit/webui/src/components/IconButton.tsx b/crates/librqbit/webui/src/components/IconButton.tsx index 963882d9..6f9518ec 100644 --- a/crates/librqbit/webui/src/components/IconButton.tsx +++ b/crates/librqbit/webui/src/components/IconButton.tsx @@ -3,9 +3,12 @@ import { MouseEventHandler } from "react"; export const IconButton: React.FC<{ onClick: () => void; disabled?: boolean; + className?: string; color?: string; children: any; -}> = ({ onClick, disabled, color, children }) => { +}> = (props) => { + const { onClick, disabled, color, children, className, ...otherProps } = + props; const onClickStopPropagation: MouseEventHandler = (e) => { e.stopPropagation(); if (disabled) { @@ -16,9 +19,10 @@ export const IconButton: React.FC<{ const colorClassName = color ? `text-${color}` : ""; return ( {children} diff --git a/desktop/src/rqbit-desktop.tsx b/desktop/src/rqbit-desktop.tsx index 6b540ba3..0214c2f0 100644 --- a/desktop/src/rqbit-desktop.tsx +++ b/desktop/src/rqbit-desktop.tsx @@ -2,6 +2,8 @@ import { useState } from "react"; import { RqbitWebUI } from "./rqbit-webui-src/rqbit-web"; import { CurrentDesktopState, RqbitDesktopConfig } from "./configuration"; import { ConfigModal } from "./configure"; +import { IconButton } from "./rqbit-webui-src/components/IconButton"; +import { BsSliders2 } from "react-icons/bs"; export const RqbitDesktop: React.FC<{ version: string; @@ -20,15 +22,14 @@ export const RqbitDesktop: React.FC<{ )} {configured && ( - { - e.stopPropagation(); + { setConfigurationOpened(true); }} - href="#" - aria-label="Settings" - /> + > + + )}