Well, it doesnt crash at least
This commit is contained in:
parent
276a1e175e
commit
efcffdd072
6 changed files with 101 additions and 21 deletions
|
|
@ -107,7 +107,7 @@ impl SessionDatabase {
|
|||
.collect(),
|
||||
info_hash: torrent.info_hash().as_string(),
|
||||
info: torrent.info().info.clone(),
|
||||
only_files: torrent.only_files.clone(),
|
||||
only_files: torrent.only_files().clone(),
|
||||
is_paused: torrent
|
||||
.with_state(|s| matches!(s, ManagedTorrentState::Paused(_))),
|
||||
output_folder: torrent.info().out_dir.clone(),
|
||||
|
|
@ -1137,6 +1137,18 @@ impl Session {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn update_only_files(
|
||||
self: &Arc<Self>,
|
||||
handle: &ManagedTorrentHandle,
|
||||
only_files: &HashSet<usize>,
|
||||
) -> anyhow::Result<()> {
|
||||
let need_to_unpause = handle.update_only_files(only_files)?;
|
||||
if need_to_unpause {
|
||||
self.unpause(handle)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn tcp_listen_port(&self) -> Option<u16> {
|
||||
self.tcp_listen_port
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue