feat: add testing-torrents

This commit is contained in:
2025-04-01 03:00:29 +08:00
parent 07ac7e3376
commit a0fc4c04d9
21 changed files with 2667 additions and 439 deletions

View File

@@ -1,11 +1,12 @@
pub mod core;
pub mod error;
pub mod qbit;
mod utils;
pub mod rqbit;
pub mod utils;
pub use core::{
Torrent, TorrentContent, TorrentDownloader, TorrentFilter, TorrentSource, BITTORRENT_MIME_TYPE,
MAGNET_SCHEMA,
BITTORRENT_MIME_TYPE, MAGNET_SCHEMA, Torrent, TorrentContent, TorrentDownloader, TorrentFilter,
TorrentSource,
};
pub use error::TorrentDownloadError;

View File

@@ -0,0 +1 @@
use librqbit::TorrentMetadata;

View File

@@ -8,13 +8,13 @@ use tracing::instrument;
use url::Url;
use crate::{
download::core::BITTORRENT_MIME_TYPE,
errors::{RError, RResult},
extract::mikan::{
MikanClient,
web_extract::{MikanEpisodeHomepage, extract_mikan_episode_id_from_homepage},
},
fetch::bytes::fetch_bytes,
sync::core::BITTORRENT_MIME_TYPE,
};
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
@@ -339,11 +339,11 @@ mod tests {
use url::Url;
use crate::{
download::core::BITTORRENT_MIME_TYPE,
extract::mikan::{
MikanBangumiAggregationRssChannel, MikanBangumiRssChannel, MikanRssChannel,
extract_mikan_rss_channel_from_rss_link,
},
sync::core::BITTORRENT_MIME_TYPE,
test_utils::mikan::build_testing_mikan_client,
};

View File

@@ -12,6 +12,7 @@ pub mod app;
pub mod auth;
pub mod cache;
pub mod database;
pub mod download;
pub mod errors;
pub mod extract;
pub mod fetch;
@@ -20,7 +21,6 @@ pub mod logger;
pub mod migrations;
pub mod models;
pub mod storage;
pub mod sync;
pub mod tasks;
#[cfg(test)]
pub mod test_utils;