mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-28 23:07:13 -04:00
Fixed: Significantly improved api performance.
This commit is contained in:
@@ -17,8 +17,6 @@ namespace NzbDrone.Api.History
|
||||
public QualityModel Quality { get; set; }
|
||||
public bool QualityCutoffNotMet { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public string Indexer { get; set; }
|
||||
public string ReleaseGroup { get; set; }
|
||||
public string DownloadId { get; set; }
|
||||
|
||||
public HistoryEventType EventType { get; set; }
|
||||
@@ -28,4 +26,31 @@ namespace NzbDrone.Api.History
|
||||
public EpisodeResource Episode { get; set; }
|
||||
public SeriesResource Series { get; set; }
|
||||
}
|
||||
|
||||
public static class HistoryResourceMapper
|
||||
{
|
||||
public static HistoryResource ToResource(this Core.History.History model)
|
||||
{
|
||||
if (model == null) return null;
|
||||
|
||||
return new HistoryResource
|
||||
{
|
||||
Id = model.Id,
|
||||
|
||||
EpisodeId = model.EpisodeId,
|
||||
SeriesId = model.SeriesId,
|
||||
SourceTitle = model.SourceTitle,
|
||||
Quality = model.Quality,
|
||||
//QualityCutoffNotMet
|
||||
Date = model.Date,
|
||||
DownloadId = model.DownloadId,
|
||||
|
||||
EventType = model.EventType,
|
||||
|
||||
Data = model.Data
|
||||
//Episode
|
||||
//Series
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user