IMetadataService.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma warning disable CS1591
  2. using System;
  3. using System.Threading;
  4. using System.Threading.Tasks;
  5. using MediaBrowser.Controller.Entities;
  6. using MediaBrowser.Controller.Library;
  7. namespace MediaBrowser.Controller.Providers
  8. {
  9. public interface IMetadataService
  10. {
  11. /// <summary>
  12. /// Gets the order.
  13. /// </summary>
  14. /// <value>The order.</value>
  15. int Order { get; }
  16. /// <summary>
  17. /// Determines whether this instance can refresh the specified item.
  18. /// </summary>
  19. /// <param name="item">The item.</param>
  20. /// <returns><c>true</c> if this instance can refresh the specified item.</returns>
  21. bool CanRefresh(BaseItem item);
  22. /// <summary>
  23. /// Determines whether this instance primarily targets the specified type.
  24. /// </summary>
  25. /// <param name="type">The type.</param>
  26. /// <returns><c>true</c> if this instance primarily targets the specified type.</returns>
  27. bool CanRefreshPrimary(Type type);
  28. /// <summary>
  29. /// Refreshes the metadata.
  30. /// </summary>
  31. /// <param name="item">The item.</param>
  32. /// <param name="refreshOptions">The options.</param>
  33. /// <param name="cancellationToken">The cancellation token.</param>
  34. /// <returns>Task.</returns>
  35. Task<ItemUpdateType> RefreshMetadata(BaseItem item, MetadataRefreshOptions refreshOptions, CancellationToken cancellationToken);
  36. }
  37. }