Refactored sonarr controller to be able to return anime or tv series based on the media found in the server. Also updated models

This commit is contained in:
2026-03-08 23:39:17 -06:00
parent a676a8e8ec
commit 87bf40dab9
14 changed files with 134 additions and 79 deletions

View File

@@ -0,0 +1,18 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace Jellyfin.Plugin.MediaCleaner.Models;
public record SonarrSeries(
[property: JsonPropertyName("id")] int Id,
[property: JsonPropertyName("title")] string? Title,
[property: JsonPropertyName("seasons")] IReadOnlyList<Season> Seasons,
[property: JsonPropertyName("ended")] bool Ended,
[property: JsonPropertyName("tvdbId")] int TvdbId
// [property: JsonPropertyName("tmdbId")] int TmdbId,
// [property: JsonPropertyName("imdbId")] int ImdbId
);
public record Season(
[property: JsonPropertyName("seasonNumber")] int? SeasonNumber
);