added category change for downloads with no additional hardlinks

This commit is contained in:
Flaminel
2025-02-19 23:46:12 +02:00
parent 5adbdbd920
commit 017e25fb06
27 changed files with 458 additions and 56 deletions
@@ -36,16 +36,25 @@ public interface IDownloadService : IDisposable
/// </summary>
/// <param name="categories">The categories by which to filter the downloads.</param>
/// <returns>A list of downloads for the provided categories.</returns>
Task<List<object>?> GetAllDownloadsToBeCleaned(List<Category> categories);
Task<List<object>?> GetDownloadsToBeCleaned(List<CleanCategory> categories);
Task<List<object>?> GetDownloadsToChangeCategory(List<string> categories);
/// <summary>
/// Cleans the downloads.
/// </summary>
/// <param name="downloads"></param>
/// <param name="downloads">The downloads to clean.</param>
/// <param name="categoriesToClean">The categories that should be cleaned.</param>
/// <param name="excludedHashes">The hashes that should not be cleaned.</param>
public abstract Task CleanDownloads(List<object> downloads, List<Category> categoriesToClean, HashSet<string> excludedHashes);
Task CleanDownloads(List<object> downloads, List<CleanCategory> categoriesToClean, HashSet<string> excludedHashes);
/// <summary>
/// Changes the category for downloads that have no hardlinks.
/// </summary>
/// <param name="downloads">The downloads to change.</param>
/// <param name="excludedHashes"></param>
Task ChangeCategoryForNoHardlinksAsync(List<object> downloads, HashSet<string> excludedHashes);
/// <summary>
/// Deletes a download item.
/// </summary>