mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 14:11:10 +00:00
Implements file hashing media library scan job
This commit is contained in:
1 parent
66998055f0
commit
03a000e1e4
63 files changed
+2009
-287
No files matched your search
@@ -0,0 +1,31 @@
|
||||
#region ========================================================================= USING =====================================================================================
|
||||
using Lumina.Application.Common.DataAccess.Entities.MediaLibrary.Management;
|
||||
using Lumina.Application.Common.Infrastructure.Models.MediaLibraryScanJobPayloads;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
#endregion
|
||||
|
||||
namespace Lumina.Application.Common.Infrastructure.Security;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for the service for hashing files by sampling chunks from them.
|
||||
/// </summary>
|
||||
public interface IFileHashService
|
||||
{
|
||||
/// <summary>
|
||||
/// Hashes <paramref name="files"/> by sampling chunks from them.
|
||||
/// </summary>
|
||||
/// <param name="files">The collection of files to hash.</param>
|
||||
/// <param name="previousScanResults">Lookup dictionary of a previous media library scan, used to determine if a file changed or not.</param>
|
||||
/// <param name="callback">Callback to invoke during processing of elements.</param>
|
||||
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
|
||||
/// <returns>A collection of files that changed since last library scan, along with their hashes.</returns>
|
||||
List<ChangedFileSystemFile> HashFiles(
|
||||
List<FileInfo> files,
|
||||
Dictionary<string, LibraryScanResultEntity> previousScanResults,
|
||||
Func<Task> callback,
|
||||
CancellationToken cancellationToken);
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@ namespace Lumina.Application.Common.Infrastructure.Security;
|
||||
/// <summary>
|
||||
/// Interface for the service for hashing passwords.
|
||||
/// </summary>
|
||||
public interface IHashService
|
||||
public interface IPasswordHashService
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a hash from a string.
|
||||
Reference in new issue
Block a user