mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-26 22:56:23 -04:00
Improve default series type handling (for daily series)
New: Display default series type when adding new/existing series when available Fixed: Don't override series type on series refresh
This commit is contained in:
@@ -7,6 +7,7 @@ using NLog;
|
||||
using NzbDrone.Common.Cloud;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Core.DataAugmentation.DailySeries;
|
||||
using NzbDrone.Core.Exceptions;
|
||||
using NzbDrone.Core.MediaCover;
|
||||
using NzbDrone.Core.MetadataSource.SkyHook.Resource;
|
||||
@@ -19,14 +20,20 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly Logger _logger;
|
||||
private readonly ISeriesService _seriesService;
|
||||
private readonly IDailySeriesService _dailySeriesService;
|
||||
private readonly IHttpRequestBuilderFactory _requestBuilder;
|
||||
|
||||
public SkyHookProxy(IHttpClient httpClient, ISonarrCloudRequestBuilder requestBuilder, ISeriesService seriesService, Logger logger)
|
||||
public SkyHookProxy(IHttpClient httpClient,
|
||||
ISonarrCloudRequestBuilder requestBuilder,
|
||||
ISeriesService seriesService,
|
||||
IDailySeriesService dailySeriesService,
|
||||
Logger logger)
|
||||
{
|
||||
_httpClient = httpClient;
|
||||
_requestBuilder = requestBuilder.SkyHookTvdb;
|
||||
_logger = logger;
|
||||
_seriesService = seriesService;
|
||||
_dailySeriesService = dailySeriesService;
|
||||
_requestBuilder = requestBuilder.SkyHookTvdb;
|
||||
}
|
||||
|
||||
@@ -127,8 +134,6 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
|
||||
private Series MapSeries(ShowResource show)
|
||||
{
|
||||
|
||||
|
||||
var series = new Series();
|
||||
series.TvdbId = show.TvdbId;
|
||||
|
||||
@@ -176,7 +181,12 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
{
|
||||
series.Certification = show.ContentRating.ToUpper();
|
||||
}
|
||||
|
||||
|
||||
if (_dailySeriesService.IsDailySeries(series.TvdbId))
|
||||
{
|
||||
series.SeriesType = SeriesTypes.Daily;
|
||||
}
|
||||
|
||||
series.Actors = show.Actors.Select(MapActors).ToList();
|
||||
series.Seasons = show.Seasons.Select(MapSeason).ToList();
|
||||
series.Images = show.Images.Select(MapImage).ToList();
|
||||
|
||||
Reference in New Issue
Block a user