trying to make tests work with new metadata

This commit is contained in:
Igor Katson 2024-08-14 10:25:05 +01:00
parent 55649e181a
commit c196c11860
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
6 changed files with 45 additions and 29 deletions

View file

@ -1,3 +1,4 @@
use bytes::Bytes;
use librqbit::{
storage::{StorageFactory, StorageFactoryExt, TorrentStorage},
SessionOptions,
@ -79,9 +80,9 @@ async fn main() -> anyhow::Result<()> {
.await?;
let handle = s
.add_torrent(
librqbit::AddTorrent::TorrentFileBytes(
include_bytes!("../resources/ubuntu-21.04-live-server-amd64.iso.torrent").into(),
),
librqbit::AddTorrent::TorrentFileBytes(Bytes::from_static(include_bytes!(
"../resources/ubuntu-21.04-live-server-amd64.iso.torrent"
))),
Some(librqbit::AddTorrentOptions {
storage_factory: Some(CustomStorageFactory::default().boxed()),
paused: false,