ILyricProvider.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections.Generic;
  2. using System.Threading;
  3. using System.Threading.Tasks;
  4. using MediaBrowser.Model.Lyrics;
  5. using MediaBrowser.Model.Providers;
  6. namespace MediaBrowser.Controller.Lyrics;
  7. /// <summary>
  8. /// Interface ILyricsProvider.
  9. /// </summary>
  10. public interface ILyricProvider
  11. {
  12. /// <summary>
  13. /// Gets the provider name.
  14. /// </summary>
  15. string Name { get; }
  16. /// <summary>
  17. /// Search for lyrics.
  18. /// </summary>
  19. /// <param name="request">The search request.</param>
  20. /// <param name="cancellationToken">The cancellation token.</param>
  21. /// <returns>The list of remote lyrics.</returns>
  22. Task<IEnumerable<RemoteLyricInfo>> SearchAsync(LyricSearchRequest request, CancellationToken cancellationToken);
  23. /// <summary>
  24. /// Get the lyrics.
  25. /// </summary>
  26. /// <param name="id">The remote lyric id.</param>
  27. /// <param name="cancellationToken">The cancellation token.</param>
  28. /// <returns>The lyric response.</returns>
  29. Task<LyricResponse?> GetLyricsAsync(string id, CancellationToken cancellationToken);
  30. }