George-Miao / qbit

A Rust library for interacting with qBittorrent's Web API
https://docs.rs/qbit-rs
MIT License
32 stars 12 forks source link

fix proxy_type #4

Closed tatref closed 9 months ago

tatref commented 9 months ago

With v4.6.1, I have: proxy_type: "None"

George-Miao commented 9 months ago

Hmm.. That's weired. See https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#get-application-preferences, the type for proxy_type should be integer

George-Miao commented 9 months ago

Ok this should be an upstream bug. I have opened an issue, if they say that's the desirable behavior, I'll merge this PR.

George-Miao commented 9 months ago

I thinked again. This change will break old users where API still returns integer instead of string. I'll write a proper enum type for this.