added Deluge label creation

This commit is contained in:
Flaminel
2025-03-25 16:11:53 +02:00
parent 3b63d1b7e5
commit 5e362d4af8
2 changed files with 19 additions and 2 deletions
@@ -1,4 +1,4 @@
using System.Net.Http.Headers;
using System.Net.Http.Headers;
using System.Text.Json.Serialization;
using Common.Configuration;
using Common.Configuration.DownloadClient;
@@ -194,6 +194,16 @@ public sealed class DelugeClient
return webResponse.Result;
}
public async Task<IReadOnlyList<string>> GetLabels()
{
return await SendRequest<IReadOnlyList<string>>("label.label.get_labels");
}
public async Task CreateLabel(string label)
{
await SendRequest<DelugeResponse<object>>("label.add", label);
}
public async Task SetTorrentLabel(string hash, string newLabel)
{
// TODO