IDtoService.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #nullable disable
  2. #pragma warning disable CA1002
  3. using System.Collections.Generic;
  4. using Jellyfin.Data.Entities;
  5. using MediaBrowser.Controller.Entities;
  6. using MediaBrowser.Model.Dto;
  7. namespace MediaBrowser.Controller.Dto
  8. {
  9. /// <summary>
  10. /// Interface IDtoService.
  11. /// </summary>
  12. public interface IDtoService
  13. {
  14. /// <summary>
  15. /// Gets the primary image aspect ratio.
  16. /// </summary>
  17. /// <param name="item">The item.</param>
  18. /// <returns>System.Nullable&lt;System.Double&gt;.</returns>
  19. double? GetPrimaryImageAspectRatio(BaseItem item);
  20. /// <summary>
  21. /// Gets the base item dto.
  22. /// </summary>
  23. /// <param name="item">The item.</param>
  24. /// <param name="options">The options.</param>
  25. /// <param name="user">The user.</param>
  26. /// <param name="owner">The owner.</param>
  27. /// <returns>BaseItemDto.</returns>
  28. BaseItemDto GetBaseItemDto(BaseItem item, DtoOptions options, User user = null, BaseItem owner = null);
  29. /// <summary>
  30. /// Gets the base item dtos.
  31. /// </summary>
  32. /// <param name="items">The items.</param>
  33. /// <param name="options">The options.</param>
  34. /// <param name="user">The user.</param>
  35. /// <param name="owner">The owner.</param>
  36. /// <returns>The <see cref="IReadOnlyList{T}"/> of <see cref="BaseItemDto"/>.</returns>
  37. IReadOnlyList<BaseItemDto> GetBaseItemDtos(IReadOnlyList<BaseItem> items, DtoOptions options, User user = null, BaseItem owner = null);
  38. /// <summary>
  39. /// Gets the item by name dto.
  40. /// </summary>
  41. /// <param name="item">The item.</param>
  42. /// <param name="options">The dto options.</param>
  43. /// <param name="taggedItems">The list of tagged items.</param>
  44. /// <param name="user">The user.</param>
  45. /// <returns>The item dto.</returns>
  46. BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List<BaseItem> taggedItems, User user = null);
  47. }
  48. }