1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-03-05 13:20:20 -05:00

New: Include Mal and AniList IDs in API response and Webhooks

Closes #7973
This commit is contained in:
Stevie Robinson
2025-08-11 06:08:25 +02:00
committed by GitHub
parent b376b63c9e
commit b09c6f0811
2 changed files with 10 additions and 0 deletions

View File

@@ -15,6 +15,8 @@ namespace NzbDrone.Core.Notifications.Webhook
public int TvMazeId { get; set; }
public int TmdbId { get; set; }
public string ImdbId { get; set; }
public HashSet<int> MalIds { get; set; }
public HashSet<int> AniListIds { get; set; }
public SeriesTypes Type { get; set; }
public int Year { get; set; }
public List<string> Genres { get; set; }
@@ -36,6 +38,8 @@ namespace NzbDrone.Core.Notifications.Webhook
TvMazeId = series.TvMazeId;
TmdbId = series.TmdbId;
ImdbId = series.ImdbId;
MalIds = series.MalIds;
AniListIds = series.AniListIds;
Type = series.SeriesType;
Year = series.Year;
Genres = series.Genres;

View File

@@ -35,6 +35,8 @@ public class SeriesResource : RestResource
public int TvRageId { get; set; }
public int TvMazeId { get; set; }
public int TmdbId { get; set; }
public HashSet<int>? MalIds { get; set; }
public HashSet<int>? AniListIds { get; set; }
public DateTime? FirstAired { get; set; }
public DateTime? LastAired { get; set; }
public SeriesTypes SeriesType { get; set; }
@@ -81,6 +83,8 @@ public static class SeriesResourceMapper
TvRageId = model.TvRageId,
TvMazeId = model.TvMazeId,
TmdbId = model.TmdbId,
MalIds = model.MalIds,
AniListIds = model.AniListIds,
FirstAired = model.FirstAired,
LastAired = model.LastAired,
SeriesType = model.SeriesType,
@@ -122,6 +126,8 @@ public static class SeriesResourceMapper
TvRageId = resource.TvRageId,
TvMazeId = resource.TvMazeId,
TmdbId = resource.TmdbId,
MalIds = resource.MalIds,
AniListIds = resource.AniListIds,
FirstAired = resource.FirstAired,
SeriesType = resource.SeriesType,
CleanTitle = resource.CleanTitle,