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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user