added dry run for category creation
This commit is contained in:
@@ -309,7 +309,7 @@ public class DelugeService : DownloadService, IDelugeService
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await _client.CreateLabel(name);
|
await _dryRunInterceptor.InterceptAsync(CreateLabel, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async Task ChangeCategoryForNoHardLinksAsync(List<object>? downloads, HashSet<string> excludedHashes, IReadOnlyList<string> ignoredDownloads)
|
public override async Task ChangeCategoryForNoHardLinksAsync(List<object>? downloads, HashSet<string> excludedHashes, IReadOnlyList<string> ignoredDownloads)
|
||||||
@@ -402,6 +402,12 @@ public class DelugeService : DownloadService, IDelugeService
|
|||||||
|
|
||||||
await _client.DeleteTorrents([hash]);
|
await _client.DeleteTorrents([hash]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DryRunSafeguard]
|
||||||
|
protected async Task CreateLabel(string name)
|
||||||
|
{
|
||||||
|
await _client.CreateLabel(name);
|
||||||
|
}
|
||||||
|
|
||||||
[DryRunSafeguard]
|
[DryRunSafeguard]
|
||||||
protected virtual async Task ChangeFilesPriority(string hash, List<int> sortedPriorities)
|
protected virtual async Task ChangeFilesPriority(string hash, List<int> sortedPriorities)
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ public class QBitService : DownloadService, IQBitService
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await _client.AddCategoryAsync(name);
|
await _dryRunInterceptor.InterceptAsync(CreateCategory, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override async Task ChangeCategoryForNoHardLinksAsync(List<object>? downloads, HashSet<string> excludedHashes, IReadOnlyList<string> ignoredDownloads)
|
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);
|
await _client.DeleteAsync(hash, deleteDownloadedData: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DryRunSafeguard]
|
||||||
|
protected async Task CreateCategory(string name)
|
||||||
|
{
|
||||||
|
await _client.AddCategoryAsync(name);
|
||||||
|
}
|
||||||
|
|
||||||
[DryRunSafeguard]
|
[DryRunSafeguard]
|
||||||
protected virtual async Task SkipFile(string hash, int fileIndex)
|
protected virtual async Task SkipFile(string hash, int fileIndex)
|
||||||
|
|||||||
Reference in New Issue
Block a user