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

problem when trying to add torrent from disk #11

Open
Drpsycho opened this issue Feb 4, 2024 · 2 comments
Open

problem when trying to add torrent from disk #11

Drpsycho opened this issue Feb 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Drpsycho
Copy link

Drpsycho commented Feb 4, 2024

Hello, I appreciate the availability of this crate. I have encountered an issue while attempting to add a torrent from the local disk. Thank you for your assistance.

    let arg = AddTorrentArg{
        source: TorrentSource::TorrentFiles { torrents: std::fs::read("test.torrent").unwrap() },
        ..AddTorrentArg::default()
    };
    let _res = api.add_torrent(arg).await;
    println!("{:?}", _res);

then catch --> Err(HttpError(reqwest::Error { kind: Builder, source: Custom("unsupported value") }))

It appears that the issue lies in the serialization component.
Method::POST => req = req.form(body), -> serde_urlencoded::to_string(form)

@George-Miao
Copy link
Owner

Thanks for pointing out! Would you like to make a PR?

@George-Miao George-Miao added the bug Something isn't working label Feb 22, 2024
@shenjiangqiu
Copy link
Contributor

any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants