Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code example for librqbit #33

Merged
merged 3 commits into from
Nov 15, 2023
Merged

Code example for librqbit #33

merged 3 commits into from
Nov 15, 2023

Conversation

ALEZ-DEV
Copy link
Contributor

I have edited the readme of the librqbit library to showcase the library
This is a really simple program, but it work

crates/librqbit/README.md Outdated Show resolved Hide resolved
Copy link
Owner

@ikatson ikatson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering all the other comments, and with a couple code modifications, I think we can simplify the example to just

let session = Session::new("C:\\Anime", Default::default());
let handle = match session.add_torrent(MAGNET_LINK, None).await {
    AddTorrentResponse::Added(handle) => {
        handle
    },
    resp => unimplemented!("{:?}", resp)
}
handle.wait_until_completed().await?;

crates/librqbit/README.md Outdated Show resolved Hide resolved
crates/librqbit/README.md Outdated Show resolved Hide resolved
crates/librqbit/README.md Outdated Show resolved Hide resolved
crates/librqbit/README.md Outdated Show resolved Hide resolved
crates/librqbit/README.md Outdated Show resolved Hide resolved
@ALEZ-DEV
Copy link
Contributor Author

There is the simplified version

@ikatson
Copy link
Owner

ikatson commented Nov 15, 2023

Didn't check if it compiles, assume you did.
LGTM and thanks for the contribution!

@ikatson ikatson merged commit 0d3d945 into ikatson:main Nov 15, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants