Refactor derived data management in PLib video library manager. Introduce functionality to clear specific types of derived data, including thumbnails, animated previews, perceptual hashes, and technical metadata. Update ILibraryService and LibraryService to support new data usage reporting and reset operations. Revise SettingsViewModel and UI components to reflect these changes, enhancing user control over data management. Update README.md to document new features and usage instructions.
This commit is contained in:
@@ -16,14 +16,18 @@ public interface ILibraryService
|
||||
IReadOnlyList<string> folders,
|
||||
CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>Disk space currently taken by cached poster frames, in bytes.</summary>
|
||||
Task<long> GetThumbnailCacheSizeAsync(CancellationToken cancellationToken = default);
|
||||
/// <summary>
|
||||
/// What each kind of derived data currently costs, one entry per
|
||||
/// <see cref="LibraryDataKind"/>, so the user can see what clearing it would free.
|
||||
/// </summary>
|
||||
Task<IReadOnlyList<LibraryDataUsage>> GetDataUsageAsync(CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Throws every poster frame away and forgets the paths, so the next scan renders them
|
||||
/// from scratch. Useful after changing the thumbnail width or capture position.
|
||||
/// Throws the named kinds of derived data away — files as well as the references to them —
|
||||
/// so the next scan rebuilds them from scratch. Useful after changing a setting that
|
||||
/// governs how they are produced, or when one of them is suspected of being wrong.
|
||||
/// </summary>
|
||||
Task ResetThumbnailsAsync(CancellationToken cancellationToken = default);
|
||||
Task ResetAsync(LibraryDataKind kinds, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>Remembers where playback stopped so the video can be resumed later.</summary>
|
||||
Task SaveProgressAsync(Guid videoId, TimeSpan position, CancellationToken cancellationToken = default);
|
||||
|
||||
Reference in New Issue
Block a user