CreatePlaylistDto.cs 952 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text.Json.Serialization;
  4. using Jellyfin.Extensions.Json.Converters;
  5. namespace Jellyfin.Api.Models.PlaylistDtos
  6. {
  7. /// <summary>
  8. /// Create new playlist dto.
  9. /// </summary>
  10. public class CreatePlaylistDto
  11. {
  12. /// <summary>
  13. /// Gets or sets the name of the new playlist.
  14. /// </summary>
  15. public string? Name { get; set; }
  16. /// <summary>
  17. /// Gets or sets item ids to add to the playlist.
  18. /// </summary>
  19. [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
  20. public IReadOnlyList<Guid> Ids { get; set; } = Array.Empty<Guid>();
  21. /// <summary>
  22. /// Gets or sets the user id.
  23. /// </summary>
  24. public Guid? UserId { get; set; }
  25. /// <summary>
  26. /// Gets or sets the media type.
  27. /// </summary>
  28. public string? MediaType { get; set; }
  29. }
  30. }