allow to use ApiInternal as a library
This commit is contained in:
parent
7a2de09794
commit
29d43dfafb
1 changed files with 2 additions and 2 deletions
|
|
@ -214,7 +214,7 @@ pub struct ApiInternal {
|
||||||
type ApiState = Arc<ApiInternal>;
|
type ApiState = Arc<ApiInternal>;
|
||||||
|
|
||||||
impl ApiInternal {
|
impl ApiInternal {
|
||||||
fn new(session: Arc<Session>) -> Self {
|
pub fn new(session: Arc<Session>) -> Self {
|
||||||
Self {
|
Self {
|
||||||
dht: session.get_dht(),
|
dht: session.get_dht(),
|
||||||
startup_time: Instant::now(),
|
startup_time: Instant::now(),
|
||||||
|
|
@ -260,7 +260,7 @@ impl ApiInternal {
|
||||||
make_torrent_details(&info_hash, handle.torrent_state().info(), only_files)
|
make_torrent_details(&info_hash, handle.torrent_state().info(), only_files)
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn api_add_torrent(
|
pub async fn api_add_torrent(
|
||||||
&self,
|
&self,
|
||||||
url: String,
|
url: String,
|
||||||
opts: Option<AddTorrentOptions>,
|
opts: Option<AddTorrentOptions>,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue