From cc5c9b7c19cae89d2b19bb7810fbba36261a0e85 Mon Sep 17 00:00:00 2001 From: LIAUD Corentin Date: Fri, 20 Sep 2024 20:59:23 +0100 Subject: [PATCH] wip: add explanations about work to do --- crates/librqbit/src/torrent_state/streaming.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/librqbit/src/torrent_state/streaming.rs b/crates/librqbit/src/torrent_state/streaming.rs index 73fb9ea0..09a00d8f 100644 --- a/crates/librqbit/src/torrent_state/streaming.rs +++ b/crates/librqbit/src/torrent_state/streaming.rs @@ -226,6 +226,12 @@ impl AsyncRead for FileStream { self.as_mut().advance(bytes_to_read as u64); tbuf.advance(bytes_to_read); + // Buffer has yet been filled with data: + // - Check if other streams actually need this piece + // - if not needed by other, ask underlying storage to delete the piece + // - on_piece_completed() could thus be replaced by delete_chunk() + // - update value in chunk tracker to say we do not have this piece anymore (or add a new BitV when removed pieces ?) + Poll::Ready(Ok(())) } }