added dry run for category creation

This commit is contained in:
Flaminel
2025-03-26 21:50:02 +02:00
parent 1a89822bad
commit 874351aed7
2 changed files with 14 additions and 2 deletions
@@ -348,7 +348,7 @@ public class QBitService : DownloadService, IQBitService
return;
}
await _client.AddCategoryAsync(name);
await _dryRunInterceptor.InterceptAsync(CreateCategory, name);
}
public override async Task ChangeCategoryForNoHardLinksAsync(List<object>? downloads, HashSet<string> excludedHashes, IReadOnlyList<string> ignoredDownloads)
@@ -446,6 +446,12 @@ public class QBitService : DownloadService, IQBitService
{
await _client.DeleteAsync(hash, deleteDownloadedData: true);
}
[DryRunSafeguard]
protected async Task CreateCategory(string name)
{
await _client.AddCategoryAsync(name);
}
[DryRunSafeguard]
protected virtual async Task SkipFile(string hash, int fileIndex)