CreatePlaylistDto.cs 858 B

123456789101112131415161718192021222324252627282930313233
  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. /// <summary>
  7. /// Create new playlist dto.
  8. /// </summary>
  9. public class CreatePlaylistDto
  10. {
  11. /// <summary>
  12. /// Gets or sets the name of the new playlist.
  13. /// </summary>
  14. public string? Name { get; set; }
  15. /// <summary>
  16. /// Gets or sets item ids to add to the playlist.
  17. /// </summary>
  18. [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
  19. public IReadOnlyList<Guid> Ids { get; set; } = Array.Empty<Guid>();
  20. /// <summary>
  21. /// Gets or sets the user id.
  22. /// </summary>
  23. public Guid? UserId { get; set; }
  24. /// <summary>
  25. /// Gets or sets the media type.
  26. /// </summary>
  27. public string? MediaType { get; set; }
  28. }