| | | 1 | | using System; |
| | | 2 | | using Jellyfin.Database.Implementations.Entities; |
| | | 3 | | |
| | | 4 | | namespace MediaBrowser.Model.Dto; |
| | | 5 | | |
| | | 6 | | /// <summary> |
| | | 7 | | /// The trickplay api model. |
| | | 8 | | /// </summary> |
| | | 9 | | public record TrickplayInfoDto |
| | | 10 | | { |
| | | 11 | | /// <summary> |
| | | 12 | | /// Initializes a new instance of the <see cref="TrickplayInfoDto"/> class. |
| | | 13 | | /// </summary> |
| | | 14 | | /// <param name="info">The trickplay info.</param> |
| | | 15 | | public TrickplayInfoDto(TrickplayInfo info) |
| | | 16 | | { |
| | 45 | 17 | | ArgumentNullException.ThrowIfNull(info); |
| | | 18 | | |
| | 45 | 19 | | Width = info.Width; |
| | 45 | 20 | | Height = info.Height; |
| | 45 | 21 | | TileWidth = info.TileWidth; |
| | 45 | 22 | | TileHeight = info.TileHeight; |
| | 45 | 23 | | ThumbnailCount = info.ThumbnailCount; |
| | 45 | 24 | | Interval = info.Interval; |
| | 45 | 25 | | Bandwidth = info.Bandwidth; |
| | 45 | 26 | | } |
| | | 27 | | |
| | | 28 | | /// <summary> |
| | | 29 | | /// Gets the width of an individual thumbnail. |
| | | 30 | | /// </summary> |
| | | 31 | | public int Width { get; init; } |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Gets the height of an individual thumbnail. |
| | | 35 | | /// </summary> |
| | | 36 | | public int Height { get; init; } |
| | | 37 | | |
| | | 38 | | /// <summary> |
| | | 39 | | /// Gets the amount of thumbnails per row. |
| | | 40 | | /// </summary> |
| | | 41 | | public int TileWidth { get; init; } |
| | | 42 | | |
| | | 43 | | /// <summary> |
| | | 44 | | /// Gets the amount of thumbnails per column. |
| | | 45 | | /// </summary> |
| | | 46 | | public int TileHeight { get; init; } |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// Gets the total amount of non-black thumbnails. |
| | | 50 | | /// </summary> |
| | | 51 | | public int ThumbnailCount { get; init; } |
| | | 52 | | |
| | | 53 | | /// <summary> |
| | | 54 | | /// Gets the interval in milliseconds between each trickplay thumbnail. |
| | | 55 | | /// </summary> |
| | | 56 | | public int Interval { get; init; } |
| | | 57 | | |
| | | 58 | | /// <summary> |
| | | 59 | | /// Gets the peak bandwidth usage in bits per second. |
| | | 60 | | /// </summary> |
| | | 61 | | public int Bandwidth { get; init; } |
| | | 62 | | } |