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
@@ -298,7 +298,14 @@ public class DelugeService : DownloadService, IDelugeService
public override async Task CreateCategoryAsync(string name)
{
throw new NotImplementedException();
IReadOnlyList<string> existingLabels = await _client.GetLabels();
if (existingLabels.Contains(name, StringComparer.InvariantCultureIgnoreCase))
{
return;
}
await _client.CreateLabel(name);
}
public override async Task ChangeCategoryForNoHardLinksAsync(List<object>? downloads, HashSet<string> excludedHashes, IReadOnlyList<string> ignoredDownloads)