Files
Jellyfin_Request_tvandmovies/Jellyfin.Plugin.Request/Api/CreateRequestDto.cs
T
Michael SloanandCursor 97619f1eb5 fix(api): harden request submit path and errors
Use ApiClient server address for API calls, return 201 without CreatedAtAction route issues, and surface clearer validation messages when submit fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 17:32:22 -04:00

42 lines
1.1 KiB
C#

using System.Collections.Generic;
namespace Jellyfin.Plugin.Request.Api;
/// <summary>
/// Body for creating a media request.
/// </summary>
public sealed class CreateRequestDto
{
/// <summary>
/// Gets or sets the media type (<c>movie</c> or <c>tv</c>).
/// </summary>
public string MediaType { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the TMDB identifier.
/// </summary>
public int TmdbId { get; set; }
/// <summary>
/// Gets or sets optional season numbers for TV.
/// Null or empty with <see cref="AllSeasons"/> true requests everything.
/// </summary>
public List<int>? Seasons { get; set; }
/// <summary>
/// Gets or sets a value indicating whether all seasons are requested.
/// </summary>
public bool AllSeasons { get; set; } = true;
}
/// <summary>
/// Optional admin note body for status transitions.
/// </summary>
public sealed class AdminNoteDto
{
/// <summary>
/// Gets or sets an optional administrator note.
/// </summary>
public string? AdminNote { get; set; }
}