Lots of small fixes including #475

This commit is contained in:
tidusjar 2016-10-19 22:53:56 +01:00
commit bcf1c9cd8e
7 changed files with 123 additions and 86 deletions

View file

@ -93,8 +93,18 @@ namespace PlexRequests.Api
request.AddHeader("Content-Type", "application/json");
var obj = Api.Execute<TvMazeShow>(request, new Uri(Uri));
obj.seasonCount = GetSeasonCount(obj.id);
var episodes = EpisodeLookup(obj.id).ToList();
foreach (var e in episodes)
{
obj.Season.Add(new TvMazeCustomSeason
{
SeasonNumber = e.season,
EpisodeNumber = e.number
});
}
return obj;
}
@ -110,6 +120,7 @@ namespace PlexRequests.Api
return Api.Execute<List<TvMazeSeasons>>(request, new Uri(Uri));
}
public int GetSeasonCount(int id)
{
var obj = GetSeasons(id);