CreatePlaylistDto.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text.Json.Serialization;
  4. using Jellyfin.Data.Enums;
  5. using Jellyfin.Extensions.Json.Converters;
  6. using MediaBrowser.Model.Entities;
  7. namespace Jellyfin.Api.Models.PlaylistDtos;
  8. /// <summary>
  9. /// Create new playlist dto.
  10. /// </summary>
  11. public class CreatePlaylistDto
  12. {
  13. /// <summary>
  14. /// Gets or sets the name of the new playlist.
  15. /// </summary>
  16. public required string Name { get; set; }
  17. /// <summary>
  18. /// Gets or sets item ids to add to the playlist.
  19. /// </summary>
  20. [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
  21. public IReadOnlyList<Guid> Ids { get; set; } = [];
  22. /// <summary>
  23. /// Gets or sets the user id.
  24. /// </summary>
  25. public Guid? UserId { get; set; }
  26. /// <summary>
  27. /// Gets or sets the media type.
  28. /// </summary>
  29. public MediaType? MediaType { get; set; }
  30. /// <summary>
  31. /// Gets or sets the playlist users.
  32. /// </summary>
  33. public IReadOnlyList<PlaylistUserPermissions> Users { get; set; } = [];
  34. /// <summary>
  35. /// Gets or sets a value indicating whether the playlist is public.
  36. /// </summary>
  37. public bool IsPublic { get; set; } = true;
  38. }