mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Started working on #26
This commit is contained in:
parent
2b20af5df0
commit
748fe2ca2d
6 changed files with 169 additions and 8 deletions
|
@ -85,7 +85,7 @@ namespace PlexRequests.Api
|
|||
return obj;
|
||||
}
|
||||
|
||||
public int GetSeasonCount(int id)
|
||||
public List<TvMazeSeasons> GetSeasons(int id)
|
||||
{
|
||||
var request = new RestRequest
|
||||
{
|
||||
|
@ -95,7 +95,11 @@ namespace PlexRequests.Api
|
|||
request.AddUrlSegment("id", id.ToString());
|
||||
request.AddHeader("Content-Type", "application/json");
|
||||
|
||||
var obj = Api.Execute<List<TvMazeSeasons>>(request, new Uri(Uri));
|
||||
return Api.Execute<List<TvMazeSeasons>>(request, new Uri(Uri));
|
||||
}
|
||||
public int GetSeasonCount(int id)
|
||||
{
|
||||
var obj = GetSeasons(id);
|
||||
var seasons = obj.Select(x => x.number > 0);
|
||||
return seasons.Count();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue