IDtoService.cs 2.0 KB

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