diff --git a/PlexRequests.Api.Interfaces/ICouchPotatoApi.cs b/PlexRequests.Api.Interfaces/ICouchPotatoApi.cs index 288f09d67..0e018e6a8 100644 --- a/PlexRequests.Api.Interfaces/ICouchPotatoApi.cs +++ b/PlexRequests.Api.Interfaces/ICouchPotatoApi.cs @@ -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); } } \ No newline at end of file diff --git a/PlexRequests.Api.Interfaces/IPlexApi.cs b/PlexRequests.Api.Interfaces/IPlexApi.cs index e0c8029e6..b13f1401b 100644 --- a/PlexRequests.Api.Interfaces/IPlexApi.cs +++ b/PlexRequests.Api.Interfaces/IPlexApi.cs @@ -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); } } \ No newline at end of file diff --git a/PlexRequests.Api.Interfaces/ISickRageApi.cs b/PlexRequests.Api.Interfaces/ISickRageApi.cs index 4953b16f6..13cfacd84 100644 --- a/PlexRequests.Api.Interfaces/ISickRageApi.cs +++ b/PlexRequests.Api.Interfaces/ISickRageApi.cs @@ -39,5 +39,7 @@ Task AddSeries(int tvdbId, int seasoncount, int[] seasons, string SickRagePing Ping(string apiKey, Uri baseUrl); Task AddSeason(int tvdbId, int season, string apiKey, Uri baseUrl); + + Task GetShows(string apiKey, Uri baseUrl); } } \ No newline at end of file diff --git a/PlexRequests.Api.Interfaces/ISonarrApi.cs b/PlexRequests.Api.Interfaces/ISonarrApi.cs index e4dce0c3a..7e888f91a 100644 --- a/PlexRequests.Api.Interfaces/ISonarrApi.cs +++ b/PlexRequests.Api.Interfaces/ISonarrApi.cs @@ -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 GetSeries(string apiKey, Uri baseUrl); } } \ No newline at end of file diff --git a/PlexRequests.Api.Interfaces/PlexRequests.Api.Interfaces.csproj b/PlexRequests.Api.Interfaces/PlexRequests.Api.Interfaces.csproj index f27825298..52b7980a0 100644 --- a/PlexRequests.Api.Interfaces/PlexRequests.Api.Interfaces.csproj +++ b/PlexRequests.Api.Interfaces/PlexRequests.Api.Interfaces.csproj @@ -9,7 +9,7 @@ Properties PlexRequests.Api.Interfaces PlexRequests.Api.Interfaces - v4.6 + v4.5.2 512 diff --git a/PlexRequests.Api.Interfaces/packages.config b/PlexRequests.Api.Interfaces/packages.config index 1c28751a9..43a581e30 100644 --- a/PlexRequests.Api.Interfaces/packages.config +++ b/PlexRequests.Api.Interfaces/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/PlexRequests.Api.Models/Movie/CouchPotatoAdd.cs b/PlexRequests.Api.Models/Movie/CouchPotatoAdd.cs index 5a2e228b9..adad93c74 100644 --- a/PlexRequests.Api.Models/Movie/CouchPotatoAdd.cs +++ b/PlexRequests.Api.Models/Movie/CouchPotatoAdd.cs @@ -14,7 +14,7 @@ public class CouchPotatoAdd } public class Rating { - public List imdb { get; set; } + public List imdb { get; set; } } @@ -23,15 +23,15 @@ public class Images { public List disc_art { get; set; } public List poster { get; set; } + public List backdrop { get; set; } public List extra_thumbs { get; set; } public List poster_original { get; set; } - public List landscape { get; set; } - public string[] actors { get; set; } + public List actors { get; set; } public List backdrop_original { get; set; } public List clear_art { get; set; } public List logo { get; set; } public List banner { get; set; } - public List backdrop { get; set; } + public List landscape { get; set; } public List extra_fanart { get; set; } } @@ -42,16 +42,17 @@ 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 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 directors { get; set; } public List 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 actors { get; set; } public List writers { get; set; } public int runtime { get; set; } @@ -59,6 +60,19 @@ public class Info 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 image_poster { get; set; } + } + public class Identifiers { public string imdb { get; set; } @@ -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 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; } } diff --git a/PlexRequests.Api.Models/Movie/CouchPotatoMovies.cs b/PlexRequests.Api.Models/Movie/CouchPotatoMovies.cs new file mode 100644 index 000000000..33399179c --- /dev/null +++ b/PlexRequests.Api.Models/Movie/CouchPotatoMovies.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace PlexRequests.Api.Models.Movie +{ + public class CouchPotatoMovies + { + public List movies { get; set; } + public int total { get; set; } + public bool success { get; set; } + public bool empty { get; set; } + } +} diff --git a/PlexRequests.Api.Models/Plex/PlexLibraries.cs b/PlexRequests.Api.Models/Plex/PlexLibraries.cs new file mode 100644 index 000000000..0be7185a7 --- /dev/null +++ b/PlexRequests.Api.Models/Plex/PlexLibraries.cs @@ -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 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; } + } + +} diff --git a/PlexRequests.Api.Models/Plex/PlexMediaType.cs b/PlexRequests.Api.Models/Plex/PlexMediaType.cs new file mode 100644 index 000000000..e464bb64b --- /dev/null +++ b/PlexRequests.Api.Models/Plex/PlexMediaType.cs @@ -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 + } +} \ No newline at end of file diff --git a/PlexRequests.Api.Models/Plex/PlexStatus.cs b/PlexRequests.Api.Models/Plex/PlexStatus.cs index e6f1e64bb..7775be50b 100644 --- a/PlexRequests.Api.Models/Plex/PlexStatus.cs +++ b/PlexRequests.Api.Models/Plex/PlexStatus.cs @@ -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")] diff --git a/PlexRequests.Api.Models/PlexRequests.Api.Models.csproj b/PlexRequests.Api.Models/PlexRequests.Api.Models.csproj index db7e29259..08d39300b 100644 --- a/PlexRequests.Api.Models/PlexRequests.Api.Models.csproj +++ b/PlexRequests.Api.Models/PlexRequests.Api.Models.csproj @@ -9,7 +9,7 @@ Properties PlexRequests.Api.Models PlexRequests.Api.Models - v4.6 + v4.5.2 512 @@ -46,6 +46,7 @@ + @@ -62,17 +63,21 @@ + + + + @@ -87,6 +92,12 @@ + + + {1252336D-42A3-482A-804C-836E60173DFA} + PlexRequests.Helpers + +
@if (Model.SearchForMovies) @@ -122,23 +131,31 @@

{{overview}}

-
+ - {{#if_eq type "movie"}} - - {{/if_eq}} - {{#if_eq type "tv"}} - + {{#if_eq available true}} + + {{else}} + {{#if_eq requested true}} + + {{else}} + {{#if_eq type "movie"}} + + {{/if_eq}} + {{#if_eq type "tv"}} + + {{/if_eq}} + {{/if_eq}} {{/if_eq}}

@@ -179,10 +196,17 @@

{{overview}}

- + - - + {{#if_eq available true}} + + {{else}} + {{#if_eq requested true}} + + {{else}} + + {{/if_eq}} + {{/if_eq}}
Track Count: {{trackCount}} Country: {{country}} @@ -194,4 +218,4 @@ - +@Html.LoadSearchAssets() diff --git a/PlexRequests.UI/Views/Shared/_Layout.cshtml b/PlexRequests.UI/Views/Shared/_Layout.cshtml index 13025d053..a61aae9c3 100644 --- a/PlexRequests.UI/Views/Shared/_Layout.cshtml +++ b/PlexRequests.UI/Views/Shared/_Layout.cshtml @@ -1,27 +1,24 @@ @using Nancy.Security @using Nancy.Session +@using PlexRequests.UI.Helpers @using PlexRequests.UI.Models @inherits Nancy.ViewEngines.Razor.NancyRazorViewBase +@{ + var baseUrl = Html.GetBaseUrl(); + var url = string.Empty; + if (!string.IsNullOrEmpty(baseUrl.ToHtmlString())) + { + url = "/" + baseUrl.ToHtmlString(); + } +} + Plex Requests - - - - - - - - - - - - - - + @Html.LoadAssets() @@ -35,53 +32,36 @@ - Plex Requests + Plex Requests
@@ -91,11 +71,11 @@
@RenderBody()
-
- +
+ -
+
\ No newline at end of file diff --git a/PlexRequests.UI/app.config b/PlexRequests.UI/app.config index 4a1adc68b..c5d2035eb 100644 --- a/PlexRequests.UI/app.config +++ b/PlexRequests.UI/app.config @@ -1,50 +1,50 @@ - + -
+
- - + + - + - + - + - - + + - - + + - - + + - + - + diff --git a/PlexRequests.UI/packages.config b/PlexRequests.UI/packages.config index 5b88b4438..8c2dea7cd 100644 --- a/PlexRequests.UI/packages.config +++ b/PlexRequests.UI/packages.config @@ -22,9 +22,9 @@ - + - + diff --git a/README.md b/README.md index ac29e41e0..fd915d2d8 100644 --- a/README.md +++ b/README.md @@ -38,63 +38,6 @@ Do you have an issue or a question? if so check out our [FAQ!](https://github.co Looking for a Docker Image? Well [rogueosb](https://github.com/rogueosb/) has created a docker image for us, You can find it [here](https://github.com/rogueosb/docker-plexrequestsnet) :smile: -#Debian/Ubuntu - -To configure PlexRequests to run on debian/ubuntu and set it to start up with the system, do the following (via terminal): - -####Create a location to drop the files (up to you, we'll use /opt/PlexRequests as an example) - -```sudo mkdir /opt/PlexRequests``` - -####Download the release zip -``` -sudo wget {release zip file url} -sudo unzip PlexRequests.zip -d /opt/PlexRequests -``` - -####Install Mono (must be on v4.x or above for compatibility) - -```sudo apt-get install mono-devel``` - -####Check your Mono version - -```sudo mono --version``` - -if you don't see v4.x or above, uninstall it, and check here for instructions: -http://www.mono-project.com/docs/getting-started/install/linux/ - -####Verify Mono properly runs PlexRequests - -```sudo /usr/bin/mono /opt/PlexRequests/Release/PlexRequests.exe``` - -####Create an upstart script to auto-start PlexRequests with your system (using port 80 in this example) - -```sudo nano /etc/init/plexrequests.conf``` - -#####Paste in the following: - -``` -start on runlevel [2345] -stop on runlevel [016] - -respawn -expect fork - -pre-start script - # echo "" -end script - -script - exec /usr/bin/mono /opt/PlexRequests/Release/PlexRequests.exe 80 -end script -``` - -####Reboot, then open up your browser to check that it's running! - -``` -sudo shutdown -r 00 -``` - # Contributors We are looking for any contributions to the project! Just pick up a task, if you have any questions ask and i'll get straight on it! diff --git a/appveyor.yml b/appveyor.yml index adf8268ba..a4751f9ed 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,9 +3,9 @@ configuration: Release assembly_info: patch: true file: '**\AssemblyInfo.*' - assembly_version: '1.6.0' + assembly_version: '1.6.1' assembly_file_version: '{version}' - assembly_informational_version: '1.6.0' + assembly_informational_version: '1.6.1' before_build: - cmd: appveyor-retry nuget restore build: