mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
frontend and tv episodes api work for #254
This commit is contained in:
parent
d7c40164cb
commit
33ba1db20b
12 changed files with 433 additions and 210 deletions
|
@ -84,6 +84,7 @@
|
|||
<Compile Include="Sonarr\SonarrProfile.cs" />
|
||||
<Compile Include="Sonarr\SystemStatus.cs" />
|
||||
<Compile Include="Tv\Authentication.cs" />
|
||||
<Compile Include="Tv\TvMazeEpisodes.cs" />
|
||||
<Compile Include="Tv\TvMazeSearch.cs" />
|
||||
<Compile Include="Tv\TvMazeSeasons.cs" />
|
||||
<Compile Include="Tv\TVMazeShow.cs" />
|
||||
|
|
44
PlexRequests.Api.Models/Tv/TvMazeEpisodes.cs
Normal file
44
PlexRequests.Api.Models/Tv/TvMazeEpisodes.cs
Normal file
|
@ -0,0 +1,44 @@
|
|||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: TvMazeEpisodes.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
namespace PlexRequests.Api.Models.Tv
|
||||
{
|
||||
public class TvMazeEpisodes
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string url { get; set; }
|
||||
public string name { get; set; }
|
||||
public int season { get; set; }
|
||||
public int number { get; set; }
|
||||
public string airdate { get; set; }
|
||||
public string airtime { get; set; }
|
||||
public string airstamp { get; set; }
|
||||
public int runtime { get; set; }
|
||||
public Image image { get; set; }
|
||||
public string summary { get; set; }
|
||||
public Links _links { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,97 +1,119 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PlexRequests.Api.Models.Tv
|
||||
{
|
||||
public class Schedule
|
||||
{
|
||||
public string time { get; set; }
|
||||
public List<object> days { get; set; }
|
||||
}
|
||||
|
||||
public class Rating
|
||||
{
|
||||
public double? average { get; set; }
|
||||
}
|
||||
|
||||
public class Country
|
||||
{
|
||||
public string name { get; set; }
|
||||
public string code { get; set; }
|
||||
public string timezone { get; set; }
|
||||
}
|
||||
|
||||
public class Network
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
public Country country { get; set; }
|
||||
}
|
||||
|
||||
public class Externals
|
||||
{
|
||||
public int? tvrage { get; set; }
|
||||
public int? thetvdb { get; set; }
|
||||
public string imdb { get; set; }
|
||||
}
|
||||
|
||||
public class Image
|
||||
{
|
||||
public string medium { get; set; }
|
||||
public string original { get; set; }
|
||||
}
|
||||
|
||||
public class Self
|
||||
{
|
||||
public string href { get; set; }
|
||||
}
|
||||
|
||||
public class Previousepisode
|
||||
{
|
||||
public string href { get; set; }
|
||||
}
|
||||
|
||||
public class Nextepisode
|
||||
{
|
||||
public string href { get; set; }
|
||||
}
|
||||
|
||||
public class Links
|
||||
{
|
||||
public Self self { get; set; }
|
||||
public Previousepisode previousepisode { get; set; }
|
||||
public Nextepisode nextepisode { get; set; }
|
||||
}
|
||||
|
||||
public class Show
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string url { get; set; }
|
||||
public string name { get; set; }
|
||||
public string type { get; set; }
|
||||
public string language { get; set; }
|
||||
public List<object> genres { get; set; }
|
||||
public string status { get; set; }
|
||||
public int? runtime { get; set; }
|
||||
public string premiered { get; set; }
|
||||
public Schedule schedule { get; set; }
|
||||
public Rating rating { get; set; }
|
||||
public int weight { get; set; }
|
||||
public Network network { get; set; }
|
||||
public object webChannel { get; set; }
|
||||
public Externals externals { get; set; }
|
||||
public Image image { get; set; }
|
||||
public string summary { get; set; }
|
||||
public int updated { get; set; }
|
||||
public Links _links { get; set; }
|
||||
}
|
||||
|
||||
public class TvMazeSearch
|
||||
{
|
||||
public double score { get; set; }
|
||||
public Show show { get; set; }
|
||||
}
|
||||
}
|
||||
#region Copyright
|
||||
// /************************************************************************
|
||||
// Copyright (c) 2016 Jamie Rees
|
||||
// File: TvMazeSearch.cs
|
||||
// Created By: Jamie Rees
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// ************************************************************************/
|
||||
#endregion
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PlexRequests.Api.Models.Tv
|
||||
{
|
||||
public class Schedule
|
||||
{
|
||||
public List<object> days { get; set; }
|
||||
public string time { get; set; }
|
||||
}
|
||||
|
||||
public class Rating
|
||||
{
|
||||
public double? average { get; set; }
|
||||
}
|
||||
|
||||
public class Country
|
||||
{
|
||||
public string code { get; set; }
|
||||
public string name { get; set; }
|
||||
public string timezone { get; set; }
|
||||
}
|
||||
|
||||
public class Network
|
||||
{
|
||||
public Country country { get; set; }
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
}
|
||||
|
||||
public class Externals
|
||||
{
|
||||
public string imdb { get; set; }
|
||||
public int? thetvdb { get; set; }
|
||||
public int? tvrage { get; set; }
|
||||
}
|
||||
|
||||
public class Image
|
||||
{
|
||||
public string medium { get; set; }
|
||||
public string original { get; set; }
|
||||
}
|
||||
|
||||
public class Self
|
||||
{
|
||||
public string href { get; set; }
|
||||
}
|
||||
|
||||
public class Previousepisode
|
||||
{
|
||||
public string href { get; set; }
|
||||
}
|
||||
|
||||
public class Nextepisode
|
||||
{
|
||||
public string href { get; set; }
|
||||
}
|
||||
|
||||
public class Links
|
||||
{
|
||||
public Nextepisode nextepisode { get; set; }
|
||||
public Previousepisode previousepisode { get; set; }
|
||||
public Self self { get; set; }
|
||||
}
|
||||
|
||||
public class Show
|
||||
{
|
||||
public Links _links { get; set; }
|
||||
public Externals externals { get; set; }
|
||||
public List<object> genres { get; set; }
|
||||
public int id { get; set; }
|
||||
public Image image { get; set; }
|
||||
public string language { get; set; }
|
||||
public string name { get; set; }
|
||||
public Network network { get; set; }
|
||||
public string premiered { get; set; }
|
||||
public Rating rating { get; set; }
|
||||
public int? runtime { get; set; }
|
||||
public Schedule schedule { get; set; }
|
||||
public string status { get; set; }
|
||||
public string summary { get; set; }
|
||||
public string type { get; set; }
|
||||
public int updated { get; set; }
|
||||
public string url { get; set; }
|
||||
public object webChannel { get; set; }
|
||||
public int weight { get; set; }
|
||||
}
|
||||
|
||||
public class TvMazeSearch
|
||||
{
|
||||
public double score { get; set; }
|
||||
public Show show { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue