qbittorrent-net-client icon indicating copy to clipboard operation
qbittorrent-net-client copied to clipboard

Can I change the savePath of the torrents ?

Open Hendryshi opened this issue 4 years ago • 6 comments

Hi,

I would like to know if there exists the way to set/change the save path for the torrents using this library ? Thanks in advance

Hendryshi avatar Oct 21 '21 19:10 Hendryshi

Hi,

Yes, sure. If you mean the default save path, then you can use something similar to:

var prefs = new Preferences { SavePath = "some path" };
await client.SetPrefencesAsync(prefs);

fedarovich avatar Oct 22 '21 01:10 fedarovich

Hi,

No I mean can I change the save path for a specific torrent ? It seems that the torrentinfo that I got from client.GetTorrentInfo is a readonly object.

Hendryshi avatar Oct 22 '21 07:10 Hendryshi

You can change the location of a torrent by using the SetLocationAsync method and the torrent hash.

Zalhera avatar Feb 25 '22 20:02 Zalhera

You can change the location of a torrent by using the SetLocationAsync method and the torrent hash.

Very cool! So to accomplish something like this: image

NOTE: In the image, I meant to change 'Default' to YES. Pretend it says 'YES'

I would need to handle it on a 'per-torrent' basis and keep path the "Category Save Path for INCOMPLETE DOWNLOADS" saved elsewhere, then reference the saved path when adding a new torrent to CategoryXYZ?

Very cool library!

jeffward01 avatar Mar 01 '22 19:03 jeffward01

You can change the location of a torrent by using the SetLocationAsync method and the torrent hash.

Hello!

I have reviewed the documentation for this, I am sorry, I can't find which object the SetLocationAsync method resides on. The documentation does not allow me to search methods, only objects.

Where can I find the SetLocationAsync method?

Thanks!


Found it! It is in the IQBittorrentClient interface.

What is the difference between:

Would we ever want to use the original (IQBittorrentClient) instead of the second version (IQBittorrentClient2)?

I see the second version is APIV2, I assume most modern QBittorrent clients use V2? Sorry for the ignorance, thanks!

Thanks

jeffward01 avatar Mar 06 '22 19:03 jeffward01

Hi,

Yes, you are right, for modern qbittorent versions (4.1+) you should always use IQBittorrentClient2.

IQBittorrentClient interface contains only functions available in qBittorrent 4.0.

fedarovich avatar Mar 06 '22 23:03 fedarovich