refactor: rewrite qbit downlaoder

This commit is contained in:
2025-04-03 02:22:26 +08:00
parent 234441e6a3
commit 27b52f7fd1
76 changed files with 1501 additions and 955 deletions

View File

@@ -6,7 +6,7 @@ use url::Url;
use super::MikanConfig;
use crate::{
errors::RError,
errors::app_error::RError,
fetch::{HttpClient, HttpClientTrait, client::HttpClientCookiesAuth},
};

View File

@@ -8,11 +8,13 @@ use tracing::instrument;
use url::Url;
use crate::{
downloader::core::BITTORRENT_MIME_TYPE,
errors::{RError, RResult},
extract::mikan::{
MikanClient,
web_extract::{MikanEpisodeHomepage, extract_mikan_episode_id_from_homepage},
errors::app_error::{RError, RResult},
extract::{
bittorrent::BITTORRENT_MIME_TYPE,
mikan::{
MikanClient,
web_extract::{MikanEpisodeHomepage, extract_mikan_episode_id_from_homepage},
},
},
fetch::bytes::fetch_bytes,
};
@@ -338,11 +340,13 @@ mod tests {
use url::Url;
use crate::{
downloader::core::BITTORRENT_MIME_TYPE,
errors::RResult,
extract::mikan::{
MikanBangumiAggregationRssChannel, MikanBangumiRssChannel, MikanRssChannel,
extract_mikan_rss_channel_from_rss_link,
errors::app_error::RResult,
extract::{
bittorrent::BITTORRENT_MIME_TYPE,
mikan::{
MikanBangumiAggregationRssChannel, MikanBangumiRssChannel, MikanRssChannel,
extract_mikan_rss_channel_from_rss_link,
},
},
test_utils::mikan::build_testing_mikan_client,
};

View File

@@ -15,7 +15,7 @@ use super::{
};
use crate::{
app::AppContextTrait,
errors::{RError, RResult},
errors::app_error::{RError, RResult},
extract::{
html::{extract_background_image_src_from_style_attr, extract_inner_text_from_element_ref},
media::extract_image_src_from_str,