IMetadataSaver.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using MediaBrowser.Controller.Entities;
  2. using MediaBrowser.Controller.Providers;
  3. using System.Threading;
  4. namespace MediaBrowser.Controller.Library
  5. {
  6. /// <summary>
  7. /// Interface IMetadataSaver
  8. /// </summary>
  9. public interface IMetadataSaver
  10. {
  11. /// <summary>
  12. /// Gets the name.
  13. /// </summary>
  14. /// <value>The name.</value>
  15. string Name { get; }
  16. /// <summary>
  17. /// Determines whether [is enabled for] [the specified item].
  18. /// </summary>
  19. /// <param name="item">The item.</param>
  20. /// <param name="updateType">Type of the update.</param>
  21. /// <returns><c>true</c> if [is enabled for] [the specified item]; otherwise, <c>false</c>.</returns>
  22. bool IsEnabledFor(IHasMetadata item, ItemUpdateType updateType);
  23. /// <summary>
  24. /// Saves the specified item.
  25. /// </summary>
  26. /// <param name="item">The item.</param>
  27. /// <param name="cancellationToken">The cancellation token.</param>
  28. /// <returns>Task.</returns>
  29. void Save(IHasMetadata item, CancellationToken cancellationToken);
  30. }
  31. public interface IMetadataFileSaver : IMetadataSaver
  32. {
  33. /// <summary>
  34. /// Gets the save path.
  35. /// </summary>
  36. /// <param name="item">The item.</param>
  37. /// <returns>System.String.</returns>
  38. string GetSavePath(IHasMetadata item);
  39. }
  40. }