Files
jellyfin-jellyfin-1/Jellyfin.Api/Models/PlaylistDtos/CreatePlaylistDto.cs

46 lines
1.2 KiB
C#
Raw Normal View History

2020-06-20 16:07:53 -06:00
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
using Jellyfin.Data.Enums;
using Jellyfin.Extensions.Json.Converters;
2024-03-26 16:13:07 +01:00
using MediaBrowser.Model.Entities;
2020-06-08 13:14:41 -06:00
2023-01-31 12:18:10 +01:00
namespace Jellyfin.Api.Models.PlaylistDtos;
/// <summary>
/// Create new playlist dto.
/// </summary>
public class CreatePlaylistDto
2020-06-08 13:14:41 -06:00
{
/// <summary>
2023-01-31 12:18:10 +01:00
/// Gets or sets the name of the new playlist.
2020-06-08 13:14:41 -06:00
/// </summary>
2024-03-26 23:45:14 +01:00
public required string Name { get; set; }
2020-06-08 13:14:41 -06:00
2023-01-31 12:18:10 +01:00
/// <summary>
/// Gets or sets item ids to add to the playlist.
/// </summary>
[JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
2024-03-26 16:13:07 +01:00
public IReadOnlyList<Guid> Ids { get; set; } = [];
2020-06-08 13:14:41 -06:00
2023-01-31 12:18:10 +01:00
/// <summary>
/// Gets or sets the user id.
/// </summary>
public Guid? UserId { get; set; }
2020-06-08 13:14:41 -06:00
2023-01-31 12:18:10 +01:00
/// <summary>
/// Gets or sets the media type.
/// </summary>
public MediaType? MediaType { get; set; }
2024-03-26 16:13:07 +01:00
/// <summary>
2024-03-26 23:45:14 +01:00
/// Gets or sets the playlist users.
2024-03-26 16:13:07 +01:00
/// </summary>
2024-04-01 19:59:48 +02:00
public IReadOnlyList<PlaylistUserPermissions> Users { get; set; } = [];
2024-03-26 16:13:07 +01:00
/// <summary>
2024-03-26 23:45:14 +01:00
/// Gets or sets a value indicating whether the playlist is public.
2024-03-26 16:13:07 +01:00
/// </summary>
2024-04-03 21:20:30 +02:00
public bool IsPublic { get; set; } = true;
2020-06-08 13:14:41 -06:00
}