Implement metadata management features in PLib video library manager. Introduce functionality to query and apply metadata from external sources based on video fingerprints. Update ILibraryService and LibraryService to support metadata lookup and application, enhancing video item descriptions and labels. Revise UI components in VideoPlayerView and SettingsView to facilitate user interaction with metadata sources. Update README.md to document new metadata features and usage instructions.

This commit is contained in:
Leonid Pershin
2026-08-09 08:18:40 +03:00
parent c41a458d0b
commit eb4894428b
31 changed files with 1442 additions and 194 deletions
@@ -1,3 +1,4 @@
using PLib.Application.Metadata;
using PLib.Domain.Videos;
namespace PLib.Application.Library;
@@ -61,4 +62,22 @@ public interface ILibraryService
CancellationToken cancellationToken = default);
Task DetachLabelAsync(Guid videoId, Guid labelId, CancellationToken cancellationToken = default);
/// <summary>
/// Asks every configured metadata source what it has for this video's fingerprint.
/// </summary>
/// <remarks>
/// Nothing calls this on its own: reaching out to a remote service about the user's files
/// happens when the user presses the button, and at no other time.
/// </remarks>
Task<MetadataLookupResult> FindMetadataAsync(Guid videoId, CancellationToken cancellationToken = default);
/// <summary>
/// Writes a match onto the video: title, description, and a label per tag, performer and
/// studio. Labels already on the video are kept — applying a match adds, never prunes.
/// </summary>
Task ApplyMetadataAsync(
Guid videoId,
VideoMetadataMatch match,
CancellationToken cancellationToken = default);
}