update only_filesafter torrent init to prevent librqbit error warning on empty list defined

This commit is contained in:
yggverse 2025-08-18 16:28:09 +03:00
parent 21933b454c
commit 320e63a2fb

View file

@ -110,15 +110,11 @@ async fn main() -> Result<()> {
},
)),
Some(AddTorrentOptions {
paused: true, // continue after `only_files` init
paused: true, // continue after `only_files` update
overwrite: true,
disable_trackers: config.tracker.is_empty(),
initial_peers: config.initial_peer.clone(),
list_only: false,
// it is important to blacklist all files preload until initiation
only_files: Some(Vec::with_capacity(
config.preload_max_filecount.unwrap_or_default(),
)),
// the destination folder to preload files match `preload_regex`
// * e.g. images for audio albums
output_folder: preload