Update for qbittorrent
This commit is contained in:
parent
367f2b6d73
commit
edf45342fb
|
@ -1 +1 @@
|
||||||
Subproject commit ff628b05cf82f053a2bf69f6b961b5afe4e2c1f0
|
Subproject commit e3e9e26be49aeb34b3985dafbfd043ba6fcc51e2
|
|
@ -7,8 +7,8 @@ use crate::{torrent::{TorrentInfo, TorrentTracker, TorrentUpload}, error::Client
|
||||||
pub type ClientResult<T> = Result<T, ClientError>;
|
pub type ClientResult<T> = Result<T, ClientError>;
|
||||||
|
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
pub trait TorrentClient<'a> {
|
pub trait TorrentClient {
|
||||||
async fn login(&mut self, url: &'a str, username: &'a str, password: &'a str) -> ClientResult<()>;
|
async fn login(&mut self, url: &str, username: &str, password: &str) -> ClientResult<()>;
|
||||||
|
|
||||||
async fn get_torrent_list(&self) -> ClientResult<Vec<TorrentInfo>>;
|
async fn get_torrent_list(&self) -> ClientResult<Vec<TorrentInfo>>;
|
||||||
|
|
||||||
|
|
|
@ -92,8 +92,8 @@ impl From<qbittorrent::TrackerStatus> for crate::torrent::TrackerStatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
impl<'a> TorrentClient<'a> for QBittorrentClient<'a> {
|
impl TorrentClient for QBittorrentClient {
|
||||||
async fn login(&mut self, url: &'a str, username: &'a str, password: &'a str) -> ClientResult<()> {
|
async fn login(&mut self, url: &str, username: &str, password: &str) -> ClientResult<()> {
|
||||||
Ok(Self::login(&mut self, url, username, password).await?)
|
Ok(Self::login(&mut self, url, username, password).await?)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue