Move to storage folder

This commit is contained in:
Igor Katson 2024-04-30 09:09:17 +01:00
parent c6a8761a8d
commit dc137c075f
6 changed files with 272 additions and 10 deletions

View file

@ -36,7 +36,7 @@ use tracing::warn;
use crate::chunk_tracker::ChunkTracker;
use crate::file_info::FileInfo;
use crate::spawn_utils::BlockingSpawner;
use crate::storage::FilesystemStorageFactory;
use crate::storage::filesystem::FilesystemStorageFactory;
use crate::storage::StorageFactory;
use crate::torrent_state::stats::LiveStats;
use crate::type_aliases::FileInfos;
@ -547,6 +547,11 @@ impl ManagedTorrentBuilder {
self
}
pub fn storage_factory(&mut self, factory: Box<dyn StorageFactory>) -> &mut Self {
self.storage = Some(ManagedTorrentBuilderStorage::Custom(factory));
self
}
pub fn force_tracker_interval(&mut self, force_tracker_interval: Duration) -> &mut Self {
self.force_tracker_interval = Some(force_tracker_interval);
self