2020-06-20 16:07:53 -06:00
|
|
|
|
using System;
|
2020-11-16 20:29:46 -07:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Text.Json.Serialization;
|
2023-05-13 12:44:31 -06:00
|
|
|
|
using Jellyfin.Data.Enums;
|
2021-06-19 18:02:33 +02:00
|
|
|
|
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>
|
2023-05-13 12:44:31 -06:00
|
|
|
|
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
|
|
|
|
}
|