.Net DelugeWeb RPC Client is a refactorisation of the great work done by SilverCard on DelugeWebClient
This library allows you to connect to the delugeweb RPC API. Some methods have been implemented, others will come according to needs or requests. The library targets multiple frameworks :
- .Net Core 3.1
- .Net Core 5
- .Net Core 6
- .NET Standard 2.0
- .NET 4.8
Simply download and restore nuget packages https://www.nuget.org/packages/DelugeRPCClient.Net/ or install it from package manager
PM> Install-Package DelugeRPCClient.Net -Version x.x.x
DelugeClient client = new DelugeClient(url: Constants.DelugeUrl, password: Constants.DelugePassword);
bool loginResult = await client.Login();
bool logoutResult = await client.Logout();
List torrents
List<Torrent> torrents = await client.ListTorrents();
Get torrent by hash
Torrent torrent = await client.GetTorrent(torrentHash);
Add a torrent by magnet uri
Torrent torrent = await client.AddTorrentByMagnet(torrentMagnetUri);
Add a torrent by .torrent file
Torrent torrent = await client.AddTorrentByFile(torrentFilename);
bool removeTorrentResult = await client.RemoveTorrent(torrentHash);
Pause Torrent
bool pauseResult = await client.PauseTorrent(torrentHash);
Resume Torrent
bool resumeResult = await client.ResumeTorrent(torrentHash);
List<string> labels = await client.ListLabels();
bool exists = await client.LabelExists(label);
bool addLabelResult = await client.AddLabel(label);
bool removeLabelResult = await client.RemoveLabel(label);
bool assignResult = await client.SetTorrentLabel(torrentHash, label);