mirror of https://github.com/lidarr/Lidarr
merge issues.
This commit is contained in:
parent
db690adadf
commit
f77469cc4d
|
@ -30,7 +30,7 @@ namespace NzbDrone.Core.MetadataSource
|
|||
try
|
||||
{
|
||||
var client = BuildClient("search", "shows");
|
||||
var restRequest = new RestRequest(GetSearchTerm(title) +"/30/seasons");
|
||||
var restRequest = new RestRequest(GetSearchTerm(title) + "/30/seasons");
|
||||
var response = client.ExecuteAndValidate<List<Show>>(restRequest);
|
||||
|
||||
return response.Select(MapSeries).ToList();
|
||||
|
@ -84,27 +84,6 @@ namespace NzbDrone.Core.MetadataSource
|
|||
{
|
||||
SeasonNumber = s.season
|
||||
}).OrderByDescending(s => s.SeasonNumber).ToList();
|
||||
series.Images.Add(new MediaCover.MediaCover { CoverType = MediaCoverTypes.Banner, Url = show.images.banner });
|
||||
series.Images.Add(new MediaCover.MediaCover { CoverType = MediaCoverTypes.Poster, Url = GetPosterThumbnailUrl(show.images.poster) });
|
||||
series.Images.Add(new MediaCover.MediaCover { CoverType = MediaCoverTypes.Fanart, Url = show.images.fanart });
|
||||
return series;
|
||||
}
|
||||
|
||||
private static Series MapSearchSeries(SearchShow show)
|
||||
{
|
||||
var series = new Series();
|
||||
series.TvdbId = show.tvdb_id;
|
||||
series.TvRageId = show.tvrage_id;
|
||||
series.ImdbId = show.imdb_id;
|
||||
series.Title = show.title;
|
||||
series.CleanTitle = Parser.Parser.CleanSeriesTitle(show.title);
|
||||
series.FirstAired = FromIso(show.first_aired_iso);
|
||||
series.Overview = show.overview;
|
||||
series.Runtime = show.runtime;
|
||||
series.Network = show.network;
|
||||
series.AirTime = show.air_time_utc;
|
||||
series.TitleSlug = show.url.ToLower().Replace("http://trakt.tv/show/", "");
|
||||
series.Status = GetSeriesStatus(show.status);
|
||||
|
||||
series.Images.Add(new MediaCover.MediaCover { CoverType = MediaCoverTypes.Banner, Url = show.images.banner });
|
||||
series.Images.Add(new MediaCover.MediaCover { CoverType = MediaCoverTypes.Poster, Url = GetPosterThumbnailUrl(show.images.poster) });
|
||||
|
@ -197,4 +176,4 @@ namespace NzbDrone.Core.MetadataSource
|
|||
return year;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue