Skip to content

Commit

Permalink
Merge pull request #158 from tidusjar/dev
Browse files Browse the repository at this point in the history
Release 1.6.1
  • Loading branch information
Jamie committed Apr 16, 2016
2 parents 3277830 + 6fa64f0 commit 0f3b010
Show file tree
Hide file tree
Showing 110 changed files with 2,958 additions and 1,193 deletions.
1 change: 1 addition & 0 deletions PlexRequests.Api.Interfaces/ICouchPotatoApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ public interface ICouchPotatoApi
bool AddMovie(string imdbid, string apiKey, string title, Uri baseUrl, string profileID = default(string));
CouchPotatoStatus GetStatus(Uri url, string apiKey);
CouchPotatoProfiles GetProfiles(Uri url, string apiKey);
CouchPotatoMovies GetMovies(Uri baseUrl, string apiKey, string[] status);
}
}
2 changes: 2 additions & 0 deletions PlexRequests.Api.Interfaces/IPlexApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@ public interface IPlexApi
PlexSearch SearchContent(string authToken, string searchTerm, Uri plexFullHost);
PlexStatus GetStatus(string authToken, Uri uri);
PlexAccount GetAccount(string authToken);
PlexLibraries GetLibrarySections(string authToken, Uri plexFullHost);
PlexSearch GetLibrary(string authToken, Uri plexFullHost, string libraryId);
}
}
2 changes: 2 additions & 0 deletions PlexRequests.Api.Interfaces/ISickRageApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ Task<SickRageTvAdd> AddSeries(int tvdbId, int seasoncount, int[] seasons, string
SickRagePing Ping(string apiKey, Uri baseUrl);

Task<SickRageTvAdd> AddSeason(int tvdbId, int season, string apiKey, Uri baseUrl);

Task<SickrageShows> GetShows(string apiKey, Uri baseUrl);
}
}
2 changes: 2 additions & 0 deletions PlexRequests.Api.Interfaces/ISonarrApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ SonarrAddSeries AddSeries(int tvdbId, string title, int qualityId, bool seasonFo
int seasonCount, int[] seasons, string apiKey, Uri baseUrl);

SystemStatus SystemStatus(string apiKey, Uri baseUrl);

List<Series> GetSeries(string apiKey, Uri baseUrl);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PlexRequests.Api.Interfaces</RootNamespace>
<AssemblyName>PlexRequests.Api.Interfaces</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion PlexRequests.Api.Interfaces/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="RestSharp" version="105.2.3" targetFramework="net452" requireReinstallation="true" />
<package id="RestSharp" version="105.2.3" targetFramework="net452" />
</packages>
35 changes: 26 additions & 9 deletions PlexRequests.Api.Models/Movie/CouchPotatoAdd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class CouchPotatoAdd
}
public class Rating
{
public List<double> imdb { get; set; }
public List<string> imdb { get; set; }
}


Expand All @@ -23,15 +23,15 @@ public class Images
{
public List<object> disc_art { get; set; }
public List<string> poster { get; set; }
public List<string> backdrop { get; set; }
public List<object> extra_thumbs { get; set; }
public List<string> poster_original { get; set; }
public List<object> landscape { get; set; }
public string[] actors { get; set; }
public List<string> actors { get; set; }
public List<string> backdrop_original { get; set; }
public List<object> clear_art { get; set; }
public List<object> logo { get; set; }
public List<object> banner { get; set; }
public List<string> backdrop { get; set; }
public List<object> landscape { get; set; }
public List<object> extra_fanart { get; set; }
}

Expand All @@ -42,23 +42,37 @@ public class Info
public int tmdb_id { get; set; }
public string plot { get; set; }
public string tagline { get; set; }
public Release_Date release_date { get; set; }
public int year { get; set; }
public string original_title { get; set; }
public string[] actor_roles { get; set; }
public List<string> actor_roles { get; set; }
public bool via_imdb { get; set; }
public string mpaa { get; set; }
public bool via_tmdb { get; set; }
public Images images { get; set; }
public List<string> directors { get; set; }
public List<string> titles { get; set; }
public string imdb { get; set; }
public int year { get; set; }
public Images images { get; set; }
public string mpaa { get; set; }
public bool via_tmdb { get; set; }
public List<string> actors { get; set; }
public List<string> writers { get; set; }
public int runtime { get; set; }
public string type { get; set; }
public string released { get; set; }
}

public class Release_Date
{
public int dvd { get; set; }
public int expires { get; set; }
public int theater { get; set; }
public bool bluray { get; set; }
}

public class Files
{
public List<string> image_poster { get; set; }
}

public class Identifiers
{
public string imdb { get; set; }
Expand All @@ -74,8 +88,11 @@ public class Movie
public string _rev { get; set; }
public string profile_id { get; set; }
public string _id { get; set; }
public List<object> tags { get; set; }
public int last_edit { get; set; }
public object category_id { get; set; }
public string type { get; set; }
public Files files { get; set; }
public Identifiers identifiers { get; set; }
}

Expand Down
12 changes: 12 additions & 0 deletions PlexRequests.Api.Models/Movie/CouchPotatoMovies.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System.Collections.Generic;

namespace PlexRequests.Api.Models.Movie
{
public class CouchPotatoMovies
{
public List<Movie> movies { get; set; }
public int total { get; set; }
public bool success { get; set; }
public bool empty { get; set; }
}
}
22 changes: 22 additions & 0 deletions PlexRequests.Api.Models/Plex/PlexLibraries.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using System.Collections.Generic;
using System.Xml.Serialization;

namespace PlexRequests.Api.Models.Plex
{
[XmlRoot(ElementName = "MediaContainer")]
public class PlexLibraries
{
[XmlElement(ElementName = "Directory")]
public List<Directory> Directories { get; set; }
}

[XmlRoot(ElementName = "Location")]
public partial class Location
{
[XmlElement(ElementName = "id")]
public int id { get; set; }
[XmlElement(ElementName = "path")]
public string path { get; set; }
}

}
35 changes: 35 additions & 0 deletions PlexRequests.Api.Models/Plex/PlexMediaType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#region Copyright
// /************************************************************************
// Copyright (c) 2016 Jamie Rees
// File: PlexType.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.Services
{
public enum PlexMediaType
{
Movie,
Show,
Music // double check this one
}
}
2 changes: 2 additions & 0 deletions PlexRequests.Api.Models/Plex/PlexStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public class Directory
public string Key { get; set; }
[XmlAttribute(AttributeName = "title")]
public string Title { get; set; }
[XmlAttribute(AttributeName = "type")]
public string type { get; set; }
}

[XmlRoot(ElementName = "MediaContainer")]
Expand Down
13 changes: 12 additions & 1 deletion PlexRequests.Api.Models/PlexRequests.Api.Models.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>PlexRequests.Api.Models</RootNamespace>
<AssemblyName>PlexRequests.Api.Models</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down Expand Up @@ -46,6 +46,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Movie\CouchPotatoAdd.cs" />
<Compile Include="Movie\CouchPotatoMovies.cs" />
<Compile Include="Movie\CouchPotatoProfiles.cs" />
<Compile Include="Movie\CouchPotatoStatus.cs" />
<Compile Include="Music\HeadphonesAlbumSearchResult.cs" />
Expand All @@ -62,17 +63,21 @@
<Compile Include="Plex\PlexAuthentication.cs" />
<Compile Include="Plex\PlexError.cs" />
<Compile Include="Plex\PlexFriends.cs" />
<Compile Include="Plex\PlexLibraries.cs" />
<Compile Include="Plex\PlexSearch.cs" />
<Compile Include="Plex\PlexStatus.cs" />
<Compile Include="Plex\PlexMediaType.cs" />
<Compile Include="Plex\PlexUserRequest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SickRage\SickRageBase.cs" />
<Compile Include="SickRage\SickrageShows.cs" />
<Compile Include="SickRage\SickRagePing.cs" />
<Compile Include="SickRage\SickRageSeasonList.cs" />
<Compile Include="SickRage\SickRageShowInformation.cs" />
<Compile Include="SickRage\SickRageStatus.cs" />
<Compile Include="SickRage\SickRageTvAdd.cs" />
<Compile Include="Sonarr\SonarrAddSeries.cs" />
<Compile Include="Sonarr\SonarrAllSeries.cs" />
<Compile Include="Sonarr\SonarrError.cs" />
<Compile Include="Sonarr\SonarrProfile.cs" />
<Compile Include="Sonarr\SystemStatus.cs" />
Expand All @@ -87,6 +92,12 @@
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PlexRequests.Helpers\PlexRequests.Helpers.csproj">
<Project>{1252336D-42A3-482A-804C-836E60173DFA}</Project>
<Name>PlexRequests.Helpers</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
2 changes: 1 addition & 1 deletion PlexRequests.Api.Models/SickRage/SickRageBase.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace PlexRequests.Api.Models.SickRage
{
public class SickRageBase<T>
public abstract class SickRageBase<T>
{
public T data { get; set; }
public string message { get; set; }
Expand Down
9 changes: 7 additions & 2 deletions PlexRequests.Api.Models/SickRage/SickRageSeasonList.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
namespace PlexRequests.Api.Models.SickRage
using Newtonsoft.Json;
using PlexRequests.Helpers;

namespace PlexRequests.Api.Models.SickRage
{
public class SickRageSeasonList : SickRageBase<int[]>
public class SickRageSeasonList : SickRageBase<object>
{
[JsonIgnore]
public int[] Data => JsonConvertHelper.ParseObjectToArray<int>(data);
}
}
42 changes: 42 additions & 0 deletions PlexRequests.Api.Models/SickRage/SickrageShows.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#region Copyright
// /************************************************************************
// Copyright (c) 2016 Jamie Rees
// File: SickrageShows.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;
using System.Collections.Generic;

namespace PlexRequests.Api.Models.SickRage
{
public class SickrageShows : SickRageBase<Dictionary<int, Item>>
{

}

public class Item
{
public int tvdbid { get; set; }
}
}
17 changes: 13 additions & 4 deletions PlexRequests.Api.Models/Sonarr/SonarrAddSeries.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
using System.Collections.Generic;

using Newtonsoft.Json;
using System;

namespace PlexRequests.Api.Models.Sonarr
{
public class Season
{
public int seasonNumber { get; set; }
public bool monitored { get; set; }
public Statistics statistics { get; set; }
}

public class Statistics
{
public int episodeFileCount { get; set; }
public int episodeCount { get; set; }
public int totalEpisodeCount { get; set; }
public long sizeOnDisk { get; set; }
public float percentOfEpisodes { get; set; }
public DateTime previousAiring { get; set; }
}

public class SonarrAddSeries
Expand All @@ -26,7 +38,7 @@ public class SonarrAddSeries
public string titleSlug { get; set; }
public int id { get; set; }
[JsonIgnore]
public string ErrorMessage { get; set; }
public List<string> ErrorMessages { get; set; }
}

public class AddOptions
Expand All @@ -35,7 +47,4 @@ public class AddOptions
public bool ignoreEpisodesWithoutFiles { get; set; }
public bool searchForMissingEpisodes { get; set; }
}



}
Loading

0 comments on commit 0f3b010

Please sign in to comment.