From 818c2e80f7d376f6498d63a613b06eab80bf1ec6 Mon Sep 17 00:00:00 2001 From: Drewster727 Date: Wed, 22 Jun 2016 11:27:09 -0500 Subject: [PATCH 01/36] better way of obtaining clean enum string --- .../Notification/EmailMessageNotification.cs | 4 ++-- PlexRequests.Services/Notification/PushbulletNotification.cs | 4 ++-- PlexRequests.Services/Notification/PushoverNotification.cs | 2 +- PlexRequests.Store/RequestedModel.cs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/PlexRequests.Services/Notification/EmailMessageNotification.cs b/PlexRequests.Services/Notification/EmailMessageNotification.cs index 466ff7a24..77b71e58a 100644 --- a/PlexRequests.Services/Notification/EmailMessageNotification.cs +++ b/PlexRequests.Services/Notification/EmailMessageNotification.cs @@ -120,8 +120,8 @@ namespace PlexRequests.Services.Notification { var message = new MimeMessage { - Body = new TextPart("plain") { Text = $"Hello! The user '{model.User}' has requested the {RequestTypeDisplay.Get(model.RequestType)?.ToLower()} '{model.Title}'! Please log in to approve this request. Request Date: {model.DateTime.ToString("f")}" }, - Subject = $"Plex Requests: New {RequestTypeDisplay.Get(model.RequestType)?.ToLower()} request for {model.Title}!" + Body = new TextPart("plain") { Text = $"Hello! The user '{model.User}' has requested the {model.RequestType.GetString()?.ToLower()} '{model.Title}'! Please log in to approve this request. Request Date: {model.DateTime.ToString("f")}" }, + Subject = $"Plex Requests: New {model.RequestType.GetString()?.ToLower()} request for {model.Title}!" }; message.From.Add(new MailboxAddress(settings.EmailSender, settings.EmailSender)); message.To.Add(new MailboxAddress(settings.RecipientEmail, settings.RecipientEmail)); diff --git a/PlexRequests.Services/Notification/PushbulletNotification.cs b/PlexRequests.Services/Notification/PushbulletNotification.cs index 8eda8d0b9..f6003bf1d 100644 --- a/PlexRequests.Services/Notification/PushbulletNotification.cs +++ b/PlexRequests.Services/Notification/PushbulletNotification.cs @@ -105,8 +105,8 @@ namespace PlexRequests.Services.Notification private async Task PushNewRequestAsync(NotificationModel model, PushbulletNotificationSettings settings) { - var message = $"The {RequestTypeDisplay.Get(model.RequestType)?.ToLower()} '{model.Title}' has been requested by user: {model.User}"; - var pushTitle = $"Plex Requests: The {RequestTypeDisplay.Get(model.RequestType)?.ToLower()} {model.Title} has been requested!"; + var message = $"The {model.RequestType.GetString()?.ToLower()} '{model.Title}' has been requested by user: {model.User}"; + var pushTitle = $"Plex Requests: The {model.RequestType.GetString()?.ToLower()} {model.Title} has been requested!"; await Push(settings, message, pushTitle); } diff --git a/PlexRequests.Services/Notification/PushoverNotification.cs b/PlexRequests.Services/Notification/PushoverNotification.cs index 9831e6562..b259a6faa 100644 --- a/PlexRequests.Services/Notification/PushoverNotification.cs +++ b/PlexRequests.Services/Notification/PushoverNotification.cs @@ -105,7 +105,7 @@ namespace PlexRequests.Services.Notification private async Task PushNewRequestAsync(NotificationModel model, PushoverNotificationSettings settings) { - var message = $"Plex Requests: The {RequestTypeDisplay.Get(model.RequestType)?.ToLower()} '{model.Title}' has been requested by user: {model.User}"; + var message = $"Plex Requests: The {model.RequestType.GetString()?.ToLower()} '{model.Title}' has been requested by user: {model.User}"; await Push(settings, message); } diff --git a/PlexRequests.Store/RequestedModel.cs b/PlexRequests.Store/RequestedModel.cs index 254b4f7be..b203db7d3 100644 --- a/PlexRequests.Store/RequestedModel.cs +++ b/PlexRequests.Store/RequestedModel.cs @@ -80,7 +80,7 @@ namespace PlexRequests.Store public static class RequestTypeDisplay { - public static string Get(RequestType type) + public static string GetString(this RequestType type) { switch (type) { From 752915ea0a2dbeac9fc0da4e5ef782cbab988fda Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 22 Jun 2016 20:22:38 +0100 Subject: [PATCH 02/36] Potential fix for #350 --- PlexRequests.Services/Jobs/CouchPotatoCacher.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PlexRequests.Services/Jobs/CouchPotatoCacher.cs b/PlexRequests.Services/Jobs/CouchPotatoCacher.cs index 3fb831b12..8a9f666b1 100644 --- a/PlexRequests.Services/Jobs/CouchPotatoCacher.cs +++ b/PlexRequests.Services/Jobs/CouchPotatoCacher.cs @@ -87,7 +87,12 @@ namespace PlexRequests.Services.Jobs public int[] QueuedIds() { var movies = Cache.Get(CacheKeys.CouchPotatoQueued); - return movies?.movies?.Select(x => x.info.tmdb_id).ToArray() ?? new int[] { }; + var items = movies?.movies?.Select(x => x.info?.tmdb_id).Cast().ToArray(); + if (items == null) + { + return new int[] { }; + } + return items; } public void Execute(IJobExecutionContext context) From 0b1edcc488956a7efd1a679d66d7ceb0057719c2 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 22 Jun 2016 20:33:24 +0100 Subject: [PATCH 03/36] Slight changes, moved the donate button --- .../Jobs/CouchPotatoCacher.cs | 6 +- PlexRequests.UI/Views/Shared/_Layout.cshtml | 314 +++++++++--------- 2 files changed, 159 insertions(+), 161 deletions(-) diff --git a/PlexRequests.Services/Jobs/CouchPotatoCacher.cs b/PlexRequests.Services/Jobs/CouchPotatoCacher.cs index 8a9f666b1..471965842 100644 --- a/PlexRequests.Services/Jobs/CouchPotatoCacher.cs +++ b/PlexRequests.Services/Jobs/CouchPotatoCacher.cs @@ -88,11 +88,7 @@ namespace PlexRequests.Services.Jobs { var movies = Cache.Get(CacheKeys.CouchPotatoQueued); var items = movies?.movies?.Select(x => x.info?.tmdb_id).Cast().ToArray(); - if (items == null) - { - return new int[] { }; - } - return items; + return items ?? new int[] { }; } public void Execute(IJobExecutionContext context) diff --git a/PlexRequests.UI/Views/Shared/_Layout.cshtml b/PlexRequests.UI/Views/Shared/_Layout.cshtml index fee4537f8..b108cf6ce 100644 --- a/PlexRequests.UI/Views/Shared/_Layout.cshtml +++ b/PlexRequests.UI/Views/Shared/_Layout.cshtml @@ -1,157 +1,159 @@ -@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.LoadAnalytics() - @Html.LoadAssets() - - - - - - -
- @RenderBody() -
-
- - - -
- - - \ No newline at end of file From af9953be6cf280ecf4cec08048f145b03ed4f9b7 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 22 Jun 2016 21:49:50 +0100 Subject: [PATCH 04/36] Added logging #350 --- PlexRequests.Services/Jobs/CouchPotatoCacher.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PlexRequests.Services/Jobs/CouchPotatoCacher.cs b/PlexRequests.Services/Jobs/CouchPotatoCacher.cs index 471965842..ee93513ab 100644 --- a/PlexRequests.Services/Jobs/CouchPotatoCacher.cs +++ b/PlexRequests.Services/Jobs/CouchPotatoCacher.cs @@ -86,7 +86,12 @@ namespace PlexRequests.Services.Jobs // we do not want to set here... public int[] QueuedIds() { + Log.Error("This is not an error, starting to get the CP Cached Id's"); + var movies = Cache.Get(CacheKeys.CouchPotatoQueued); + Log.Error("Cached result:"); + Log.Error(movies.DumpJson()); + var items = movies?.movies?.Select(x => x.info?.tmdb_id).Cast().ToArray(); return items ?? new int[] { }; } From 8b52ba29679bcb0a602d4c057ed416c61a196cef Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 22 Jun 2016 22:21:25 +0100 Subject: [PATCH 05/36] Generic try catch to fix #350 --- .../Jobs/CouchPotatoCacher.cs | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/PlexRequests.Services/Jobs/CouchPotatoCacher.cs b/PlexRequests.Services/Jobs/CouchPotatoCacher.cs index ee93513ab..be36d004f 100644 --- a/PlexRequests.Services/Jobs/CouchPotatoCacher.cs +++ b/PlexRequests.Services/Jobs/CouchPotatoCacher.cs @@ -24,6 +24,8 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // ************************************************************************/ #endregion + +using System; using System.Linq; using NLog; @@ -86,14 +88,18 @@ namespace PlexRequests.Services.Jobs // we do not want to set here... public int[] QueuedIds() { - Log.Error("This is not an error, starting to get the CP Cached Id's"); - - var movies = Cache.Get(CacheKeys.CouchPotatoQueued); - Log.Error("Cached result:"); - Log.Error(movies.DumpJson()); + try + { + var movies = Cache.Get(CacheKeys.CouchPotatoQueued); - var items = movies?.movies?.Select(x => x.info?.tmdb_id).Cast().ToArray(); - return items ?? new int[] { }; + var items = movies?.movies?.Select(x => x.info?.tmdb_id).Cast().ToArray(); + return items ?? new int[] { }; + } + catch (Exception e) + { + Log.Error(e); + return new int[] {}; + } } public void Execute(IJobExecutionContext context) From 4a79bb782e6fa11ee58a8b2d71ecde5912d5075a Mon Sep 17 00:00:00 2001 From: tidusjar Date: Thu, 23 Jun 2016 08:50:34 +0100 Subject: [PATCH 06/36] Fixed #362 --- PlexRequests.UI/Views/Issues/Index.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PlexRequests.UI/Views/Issues/Index.cshtml b/PlexRequests.UI/Views/Issues/Index.cshtml index 77d7b983f..acd721b3d 100644 --- a/PlexRequests.UI/Views/Issues/Index.cshtml +++ b/PlexRequests.UI/Views/Issues/Index.cshtml @@ -26,7 +26,7 @@

Type

-

Issue's

+

Issues

From d8cca4a971f48ce317d791468fcfaecb73b8b603 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Thu, 23 Jun 2016 09:01:05 +0100 Subject: [PATCH 07/36] Some more useful analytical information --- PlexRequests.Helpers/Analytics/Action.cs | 6 +++++- PlexRequests.UI/Modules/SearchModule.cs | 22 +++++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/PlexRequests.Helpers/Analytics/Action.cs b/PlexRequests.Helpers/Analytics/Action.cs index 4a42a45be..6cbe2a737 100644 --- a/PlexRequests.Helpers/Analytics/Action.cs +++ b/PlexRequests.Helpers/Analytics/Action.cs @@ -35,6 +35,10 @@ namespace PlexRequests.Helpers.Analytics Save, Update, Start, - View + View, + Movie, + TvShow, + Album, + Request } } \ No newline at end of file diff --git a/PlexRequests.UI/Modules/SearchModule.cs b/PlexRequests.UI/Modules/SearchModule.cs index f02a417ea..ddb9f31e1 100644 --- a/PlexRequests.UI/Modules/SearchModule.cs +++ b/PlexRequests.UI/Modules/SearchModule.cs @@ -53,11 +53,14 @@ using Nancy.Responses; using PlexRequests.Api.Models.Tv; using PlexRequests.Core.Models; +using PlexRequests.Helpers.Analytics; using PlexRequests.Store.Models; using PlexRequests.Store.Repository; using TMDbLib.Objects.General; +using Action = PlexRequests.Helpers.Analytics.Action; + namespace PlexRequests.UI.Modules { public class SearchModule : BaseAuthModule @@ -69,7 +72,7 @@ namespace PlexRequests.UI.Modules INotificationService notify, IMusicBrainzApi mbApi, IHeadphonesApi hpApi, ISettingsService hpService, ICouchPotatoCacher cpCacher, ISonarrCacher sonarrCacher, ISickRageCacher sickRageCacher, IPlexApi plexApi, ISettingsService plexService, ISettingsService auth, IRepository u, ISettingsService email, - IIssueService issue) : base("search", prSettings) + IIssueService issue, IAnalytics a) : base("search", prSettings) { Auth = auth; PlexService = plexService; @@ -95,6 +98,7 @@ namespace PlexRequests.UI.Modules UsersToNotifyRepo = u; EmailNotificationSettings = email; IssueService = issue; + Analytics = a; Get["/", true] = async (x, ct) => await RequestLoad(); @@ -140,31 +144,31 @@ namespace PlexRequests.UI.Modules private IHeadphonesApi HeadphonesApi { get; } private IRepository UsersToNotifyRepo { get; } private IIssueService IssueService { get; } + private IAnalytics Analytics { get; } private static Logger Log = LogManager.GetCurrentClassLogger(); private async Task RequestLoad() { var settings = await PrService.GetSettingsAsync(); - Log.Trace("Loading Index"); return View["Search/Index", settings]; } private async Task UpcomingMovies() { - Log.Trace("Loading upcoming movies"); + await Analytics.TrackEventAsync(Category.Search, Action.Movie, "Upcoming", Username, CookieHelper.GetAnalyticClientId(Cookies)); return await ProcessMovies(MovieSearchType.Upcoming, string.Empty); } private async Task CurrentlyPlayingMovies() { - Log.Trace("Loading currently playing movies"); + await Analytics.TrackEventAsync(Category.Search, Action.Movie, "CurrentlyPlaying", Username, CookieHelper.GetAnalyticClientId(Cookies)); return await ProcessMovies(MovieSearchType.CurrentlyPlaying, string.Empty); } private async Task SearchMovie(string searchTerm) { - Log.Trace("Searching for Movie {0}", searchTerm); + await Analytics.TrackEventAsync(Category.Search, Action.Movie, searchTerm, Username, CookieHelper.GetAnalyticClientId(Cookies)); return await ProcessMovies(MovieSearchType.Search, searchTerm); } @@ -279,6 +283,7 @@ namespace PlexRequests.UI.Modules private async Task SearchTvShow(string searchTerm) { + await Analytics.TrackEventAsync(Category.Search, Action.TvShow, searchTerm, Username, CookieHelper.GetAnalyticClientId(Cookies)); var plexSettings = await PlexService.GetSettingsAsync(); Log.Trace("Searching for TV Show {0}", searchTerm); @@ -366,6 +371,7 @@ namespace PlexRequests.UI.Modules private async Task SearchMusic(string searchTerm) { + await Analytics.TrackEventAsync(Category.Search, Action.Album, searchTerm, Username, CookieHelper.GetAnalyticClientId(Cookies)); var apiAlbums = new List(); await Task.Run(() => MusicBrainzApi.SearchAlbum(searchTerm)).ContinueWith((t) => { @@ -417,6 +423,7 @@ namespace PlexRequests.UI.Modules private async Task RequestMovie(int movieId) { + await Analytics.TrackEventAsync(Category.Search, Action.Request, "Movie", Username, CookieHelper.GetAnalyticClientId(Cookies)); var movieInfo = MovieApi.GetMovieInformation(movieId).Result; var fullMovieName = $"{movieInfo.Title}{(movieInfo.ReleaseDate.HasValue ? $" ({movieInfo.ReleaseDate.Value.Year})" : string.Empty)}"; Log.Trace("Getting movie info from TheMovieDb"); @@ -559,6 +566,7 @@ namespace PlexRequests.UI.Modules /// private async Task RequestTvShow(int showId, string seasons) { + await Analytics.TrackEventAsync(Category.Search, Action.Request, "TvShow", Username, CookieHelper.GetAnalyticClientId(Cookies)); var tvApi = new TvMazeApi(); var showInfo = tvApi.ShowLookupByTheTvDbId(showId); @@ -762,6 +770,7 @@ namespace PlexRequests.UI.Modules private async Task RequestAlbum(string releaseId) { + await Analytics.TrackEventAsync(Category.Search, Action.Request, "Album", Username, CookieHelper.GetAnalyticClientId(Cookies)); var settings = await PrService.GetSettingsAsync(); var existingRequest = await RequestService.CheckRequestAsync(releaseId); Log.Debug("Checking for an existing request"); @@ -919,6 +928,7 @@ namespace PlexRequests.UI.Modules private async Task NotifyUser(bool notify) { + await Analytics.TrackEventAsync(Category.Search, Action.Save, "NotifyUser", Username, CookieHelper.GetAnalyticClientId(Cookies), notify ? 1 : 0); var authSettings = await Auth.GetSettingsAsync(); var auth = authSettings.UserAuthentication; var emailSettings = await EmailNotificationSettings.GetSettingsAsync(); @@ -984,7 +994,5 @@ namespace PlexRequests.UI.Modules var model = seasons.Select(x => x.number); return Response.AsJson(model); } - - } } From ba52772fd95b32b0c73ff53a59c312df4ad9b6df Mon Sep 17 00:00:00 2001 From: tidusjar Date: Thu, 23 Jun 2016 14:39:04 +0100 Subject: [PATCH 08/36] Fixed #364 --- PlexRequests.UI/Content/requests-1.7.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PlexRequests.UI/Content/requests-1.7.js b/PlexRequests.UI/Content/requests-1.7.js index 041b67bcc..a65bc3425 100644 --- a/PlexRequests.UI/Content/requests-1.7.js +++ b/PlexRequests.UI/Content/requests-1.7.js @@ -159,7 +159,7 @@ $('#approveTVShows').click(function (e) { $('#deleteMovies').click(function (e) { e.preventDefault(); - if (!confirm("Are you sure you want to delete all TV show requests?")) return; + if (!confirm("Are you sure you want to delete all Movie requests?")) return; var buttonId = e.target.id; var origHtml = $(this).html(); From 7a8d7e3f19d5a5c1370e782e9c17d73b485000c5 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 24 Jun 2016 09:39:31 +0100 Subject: [PATCH 09/36] Started #243 --- PlexRequests.Core.Tests/app.config | 22 +- PlexRequests.Core/PlexRequests.Core.csproj | 266 ++-- PlexRequests.Core/app.config | 22 +- PlexRequests.Core/packages.config | 16 +- .../PlexRequests.Resources.csproj | 64 + .../Properties/AssemblyInfo.cs | 36 + PlexRequests.Resources/UI.Designer.cs | 145 ++ PlexRequests.Resources/UI.resx | 128 ++ PlexRequests.Services.Tests/app.config | 22 +- PlexRequests.Services/app.config | 22 +- PlexRequests.UI.Tests/app.config | 54 +- PlexRequests.UI/Bootstrapper.cs | 454 +++--- PlexRequests.UI/Modules/LandingPageModule.cs | 1 + PlexRequests.UI/PlexRequests.UI.csproj | 1314 +++++++++-------- PlexRequests.UI/Startup.cs | 116 +- PlexRequests.UI/Views/UserLogin/Index.cshtml | 138 +- PlexRequests.UI/app.config | 100 +- PlexRequests.sln | 210 +-- 18 files changed, 1757 insertions(+), 1373 deletions(-) create mode 100644 PlexRequests.Resources/PlexRequests.Resources.csproj create mode 100644 PlexRequests.Resources/Properties/AssemblyInfo.cs create mode 100644 PlexRequests.Resources/UI.Designer.cs create mode 100644 PlexRequests.Resources/UI.resx diff --git a/PlexRequests.Core.Tests/app.config b/PlexRequests.Core.Tests/app.config index 44b249bff..afa1b4c43 100644 --- a/PlexRequests.Core.Tests/app.config +++ b/PlexRequests.Core.Tests/app.config @@ -1,11 +1,11 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/PlexRequests.Core/PlexRequests.Core.csproj b/PlexRequests.Core/PlexRequests.Core.csproj index 495a09ed8..555c02754 100644 --- a/PlexRequests.Core/PlexRequests.Core.csproj +++ b/PlexRequests.Core/PlexRequests.Core.csproj @@ -1,134 +1,134 @@ - - - - - Debug - AnyCPU - {DD7DC444-D3BF-4027-8AB9-EFC71F5EC581} - Library - Properties - PlexRequests.Core - PlexRequests.Core - v4.5 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\Assemblies\Mono.Data.Sqlite.dll - - - ..\packages\NLog.4.3.4\lib\net45\NLog.dll - True - - - - - - - - - - - ..\packages\TMDbLib.0.9.0.0-alpha\lib\net45\TMDbLib.dll - - - ..\packages\Nancy.1.4.3\lib\net40\Nancy.dll - - - ..\packages\Nancy.Authentication.Forms.1.4.1\lib\net40\Nancy.Authentication.Forms.dll - - - ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll - - - ..\packages\Octokit.0.19.0\lib\net45\Octokit.dll - - - ..\packages\valueinjecter.3.1.1.2\lib\net40\Omu.ValueInjecter.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {95834072-A675-415D-AA8F-877C91623810} - PlexRequests.Api.Interfaces - - - {CB37A5F8-6DFC-4554-99D3-A42B502E4591} - PlexRequests.Api.Models - - - {8CB8D235-2674-442D-9C6A-35FCAEEB160D} - PlexRequests.Api - - - {1252336D-42A3-482A-804C-836E60173DFA} - PlexRequests.Helpers - - - {92433867-2B7B-477B-A566-96C382427525} - PlexRequests.Store - - - - + + + + + Debug + AnyCPU + {DD7DC444-D3BF-4027-8AB9-EFC71F5EC581} + Library + Properties + PlexRequests.Core + PlexRequests.Core + v4.5 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\Assemblies\Mono.Data.Sqlite.dll + + + ..\packages\NLog.4.3.4\lib\net45\NLog.dll + True + + + + + + + + + + + ..\packages\TMDbLib.0.9.0.0-alpha\lib\net45\TMDbLib.dll + + + ..\packages\Nancy.1.4.3\lib\net40\Nancy.dll + + + ..\packages\Nancy.Authentication.Forms.1.4.1\lib\net40\Nancy.Authentication.Forms.dll + + + ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + + + ..\packages\Octokit.0.19.0\lib\net45\Octokit.dll + + + ..\packages\valueinjecter.3.1.1.2\lib\net40\Omu.ValueInjecter.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {95834072-A675-415D-AA8F-877C91623810} + PlexRequests.Api.Interfaces + + + {CB37A5F8-6DFC-4554-99D3-A42B502E4591} + PlexRequests.Api.Models + + + {8CB8D235-2674-442D-9C6A-35FCAEEB160D} + PlexRequests.Api + + + {1252336D-42A3-482A-804C-836E60173DFA} + PlexRequests.Helpers + + + {92433867-2B7B-477B-A566-96C382427525} + PlexRequests.Store + + + + \ No newline at end of file diff --git a/PlexRequests.Core/app.config b/PlexRequests.Core/app.config index 44b249bff..afa1b4c43 100644 --- a/PlexRequests.Core/app.config +++ b/PlexRequests.Core/app.config @@ -1,11 +1,11 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/PlexRequests.Core/packages.config b/PlexRequests.Core/packages.config index 41cff5672..9f54b7236 100644 --- a/PlexRequests.Core/packages.config +++ b/PlexRequests.Core/packages.config @@ -1,9 +1,9 @@ - - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/PlexRequests.Resources/PlexRequests.Resources.csproj b/PlexRequests.Resources/PlexRequests.Resources.csproj new file mode 100644 index 000000000..4499431cf --- /dev/null +++ b/PlexRequests.Resources/PlexRequests.Resources.csproj @@ -0,0 +1,64 @@ + + + + + Debug + AnyCPU + {9C266462-BE82-461A-87A2-9EDCFB95D732} + Library + Properties + PlexRequests.Resources + PlexRequests.Resources + v4.5.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + True + True + UI.resx + + + + + PublicResXFileCodeGenerator + UI.Designer.cs + + + + + \ No newline at end of file diff --git a/PlexRequests.Resources/Properties/AssemblyInfo.cs b/PlexRequests.Resources/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..1f1c2d1b7 --- /dev/null +++ b/PlexRequests.Resources/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("PlexRequests.Resources")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("PlexRequests.Resources")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("9c266462-be82-461a-87a2-9edcfb95d732")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/PlexRequests.Resources/UI.Designer.cs b/PlexRequests.Resources/UI.Designer.cs new file mode 100644 index 000000000..3e5b37d5f --- /dev/null +++ b/PlexRequests.Resources/UI.Designer.cs @@ -0,0 +1,145 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace PlexRequests.Resources { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class UI { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal UI() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PlexRequests.Resources.UI", typeof(UI).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Something went wrong!. + /// + public static string Javascript_SomethingWentWrong { + get { + return ResourceManager.GetString("Javascript_SomethingWentWrong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Success!. + /// + public static string Javascript_Success { + get { + return ResourceManager.GetString("Javascript_Success", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Want to watch a movie or tv show but it's not currently on Plex? + /// Login below with your Plex.tv username and password!. + /// + public static string UserLogin_Paragraph { + get { + return ResourceManager.GetString("UserLogin_Paragraph", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your login details are only used to authenticate your Plex account.. + /// + public static string UserLogin_Paragraph_SpanHover { + get { + return ResourceManager.GetString("UserLogin_Paragraph_SpanHover", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Password. + /// + public static string UserLogin_Password { + get { + return ResourceManager.GetString("UserLogin_Password", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Sign In. + /// + public static string UserLogin_SignIn { + get { + return ResourceManager.GetString("UserLogin_SignIn", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Login. + /// + public static string UserLogin_Title { + get { + return ResourceManager.GetString("UserLogin_Title", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Plex.tv Username . + /// + public static string UserLogin_Username { + get { + return ResourceManager.GetString("UserLogin_Username", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Username. + /// + public static string UserLogin_Username_Placeholder { + get { + return ResourceManager.GetString("UserLogin_Username_Placeholder", resourceCulture); + } + } + } +} diff --git a/PlexRequests.Resources/UI.resx b/PlexRequests.Resources/UI.resx new file mode 100644 index 000000000..7d6650fbb --- /dev/null +++ b/PlexRequests.Resources/UI.resx @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Login + + + Want to watch a movie or tv show but it's not currently on Plex? + Login below with your Plex.tv username and password! + + + Your login details are only used to authenticate your Plex account. + + + Plex.tv Username + + + Username + + + Password + + + Sign In + + + Something went wrong! + + + Success! + + \ No newline at end of file diff --git a/PlexRequests.Services.Tests/app.config b/PlexRequests.Services.Tests/app.config index 44b249bff..afa1b4c43 100644 --- a/PlexRequests.Services.Tests/app.config +++ b/PlexRequests.Services.Tests/app.config @@ -1,11 +1,11 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/PlexRequests.Services/app.config b/PlexRequests.Services/app.config index 44b249bff..afa1b4c43 100644 --- a/PlexRequests.Services/app.config +++ b/PlexRequests.Services/app.config @@ -1,11 +1,11 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/PlexRequests.UI.Tests/app.config b/PlexRequests.UI.Tests/app.config index d1c064e34..3799f3a1a 100644 --- a/PlexRequests.UI.Tests/app.config +++ b/PlexRequests.UI.Tests/app.config @@ -1,28 +1,28 @@ - - - - -
- - - - - - - - - - - - - - - - - - - - - - + + + + +
+ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PlexRequests.UI/Bootstrapper.cs b/PlexRequests.UI/Bootstrapper.cs index 176404b02..8a1df5539 100644 --- a/PlexRequests.UI/Bootstrapper.cs +++ b/PlexRequests.UI/Bootstrapper.cs @@ -1,228 +1,228 @@ -#region Copyright -// /************************************************************************ -// Copyright (c) 2016 Jamie Rees -// File: Bootstrapper.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.Net; - -using Mono.Data.Sqlite; - -using Nancy; -using Nancy.Authentication.Forms; -using Nancy.Bootstrapper; -using Nancy.Conventions; -using Nancy.Cryptography; -using Nancy.Diagnostics; -using Nancy.Session; -using Nancy.TinyIoc; - -using PlexRequests.Api; -using PlexRequests.Api.Interfaces; -using PlexRequests.Core; -using PlexRequests.Core.SettingModels; -using PlexRequests.Helpers; -using PlexRequests.Services; -using PlexRequests.Services.Interfaces; -using PlexRequests.Services.Notification; -using PlexRequests.Store; -using PlexRequests.Store.Models; -using PlexRequests.Store.Repository; -using PlexRequests.UI.Helpers; -using Nancy.Json; - -using PlexRequests.Helpers.Analytics; -using PlexRequests.Services.Jobs; -using PlexRequests.UI.Jobs; - -using Quartz; -using Quartz.Impl; -using Quartz.Spi; - -namespace PlexRequests.UI -{ - public class Bootstrapper : DefaultNancyBootstrapper - { - // The bootstrapper enables you to reconfigure the composition of the framework, - // by overriding the various methods and properties. - // For more information https://github.com/NancyFx/Nancy/wiki/Bootstrapper - - protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines) - { - ConfigureContainer(container); - - JsonSettings.MaxJsonLength = int.MaxValue; - - CookieBasedSessions.Enable(pipelines, CryptographyConfiguration.Default); - StaticConfiguration.DisableErrorTraces = false; - - base.ApplicationStartup(container, pipelines); - - var settings = new SettingsServiceV2(new SettingsJsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider())); - var baseUrl = settings.GetSettings().BaseUrl; - var redirect = string.IsNullOrEmpty(baseUrl) ? "~/login" : $"~/{baseUrl}/login"; - - // Enable forms auth - var formsAuthConfiguration = new FormsAuthenticationConfiguration - { - RedirectUrl = redirect, - UserMapper = container.Resolve() - }; - - FormsAuthentication.Enable(pipelines, formsAuthConfiguration); - - ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls; - ServicePointManager.ServerCertificateValidationCallback += - (sender, certificate, chain, sslPolicyErrors) => true; - - SubscribeAllObservers(container); - - } - - protected override void ConfigureConventions(NancyConventions nancyConventions) - { - base.ConfigureConventions(nancyConventions); - - var settings = new SettingsServiceV2(new SettingsJsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider())); - var assetLocation = settings.GetSettings().BaseUrl; - nancyConventions.StaticContentsConventions.Add( - StaticContentConventionBuilder.AddDirectory($"{assetLocation}/Content", "Content") - ); - - nancyConventions.StaticContentsConventions.AddDirectory($"{assetLocation}/docs", "swagger-ui"); - } - - protected override DiagnosticsConfiguration DiagnosticsConfiguration => new DiagnosticsConfiguration { Password = @"password" }; - - private void SubscribeAllObservers(TinyIoCContainer container) - { - var notificationService = container.Resolve(); - - var emailSettingsService = container.Resolve>(); - var emailSettings = emailSettingsService.GetSettings(); - if (emailSettings.Enabled) - { - notificationService.Subscribe(new EmailMessageNotification(emailSettingsService)); - } - - var pushbulletService = container.Resolve>(); - var pushbulletSettings = pushbulletService.GetSettings(); - if (pushbulletSettings.Enabled) - { - notificationService.Subscribe(new PushbulletNotification(container.Resolve(), pushbulletService)); - } - - var pushoverService = container.Resolve>(); - var pushoverSettings = pushoverService.GetSettings(); - if (pushoverSettings.Enabled) - { - notificationService.Subscribe(new PushoverNotification(container.Resolve(), pushoverService)); - } - - var slackService = container.Resolve>(); - var slackSettings = slackService.GetSettings(); - if (slackSettings.Enabled) - { - notificationService.Subscribe(new SlackNotification(container.Resolve(), slackService)); - } - } - - protected override void RequestStartup(TinyIoCContainer container, IPipelines pipelines, NancyContext context) - { - //CORS Enable - pipelines.AfterRequest.AddItemToEndOfPipeline((ctx) => - { - ctx.Response.WithHeader("Access-Control-Allow-Origin", "*") - .WithHeader("Access-Control-Allow-Methods", "POST,GET") - .WithHeader("Access-Control-Allow-Headers", "Accept, Origin, Content-type"); - - }); - base.RequestStartup(container, pipelines, context); - } - - private void ConfigureContainer(TinyIoCContainer container) - { - container.Register().AsSingleton(); - container.Register(new DbConfiguration(new SqliteFactory())); - container.Register, UserRepository>(); - container.Register(); - container.Register(); - container.Register, SettingsServiceV2>(); - container.Register, SettingsServiceV2>(); - container.Register, SettingsServiceV2>(); - container.Register, SettingsServiceV2>(); - container.Register, SettingsServiceV2>(); - - // Notification Service - container.Register().AsSingleton(); - // Settings - container.Register, SettingsServiceV2>(); - container.Register, SettingsServiceV2>(); - container.Register, SettingsServiceV2>(); - container.Register, SettingsServiceV2>(); - container.Register, SettingsServiceV2>(); - container.Register, SettingsServiceV2>(); - - container.Register, SettingsServiceV2>(); - container.Register, SettingsServiceV2>(); - container.Register, SettingsServiceV2>(); - - // Repo's - container.Register, GenericRepository>(); - container.Register, GenericRepository>(); - container.Register, GenericRepository>(); - container.Register, GenericRepository>(); - container.Register(); - container.Register(); - container.Register(); - container.Register(); - - // Services - container.Register(); - container.Register(); - container.Register(); - container.Register(); - container.Register(); - - container.Register(); - container.Register(); - container.Register(); - - - // Api - container.Register(); - container.Register(); - container.Register(); - container.Register(); - container.Register(); - container.Register(); - container.Register(); - container.Register(); - container.Register(); - - var loc = ServiceLocator.Instance; - loc.SetContainer(container); - } - } +#region Copyright +// /************************************************************************ +// Copyright (c) 2016 Jamie Rees +// File: Bootstrapper.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.Net; + +using Mono.Data.Sqlite; + +using Nancy; +using Nancy.Authentication.Forms; +using Nancy.Bootstrapper; +using Nancy.Conventions; +using Nancy.Cryptography; +using Nancy.Diagnostics; +using Nancy.Session; +using Nancy.TinyIoc; + +using PlexRequests.Api; +using PlexRequests.Api.Interfaces; +using PlexRequests.Core; +using PlexRequests.Core.SettingModels; +using PlexRequests.Helpers; +using PlexRequests.Services; +using PlexRequests.Services.Interfaces; +using PlexRequests.Services.Notification; +using PlexRequests.Store; +using PlexRequests.Store.Models; +using PlexRequests.Store.Repository; +using PlexRequests.UI.Helpers; +using Nancy.Json; + +using PlexRequests.Helpers.Analytics; +using PlexRequests.Services.Jobs; +using PlexRequests.UI.Jobs; + +using Quartz; +using Quartz.Impl; +using Quartz.Spi; + +namespace PlexRequests.UI +{ + public class Bootstrapper : DefaultNancyBootstrapper + { + // The bootstrapper enables you to reconfigure the composition of the framework, + // by overriding the various methods and properties. + // For more information https://github.com/NancyFx/Nancy/wiki/Bootstrapper + + protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines) + { + ConfigureContainer(container); + + JsonSettings.MaxJsonLength = int.MaxValue; + + CookieBasedSessions.Enable(pipelines, CryptographyConfiguration.Default); + StaticConfiguration.DisableErrorTraces = false; + + base.ApplicationStartup(container, pipelines); + + var settings = new SettingsServiceV2(new SettingsJsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider())); + var baseUrl = settings.GetSettings().BaseUrl; + var redirect = string.IsNullOrEmpty(baseUrl) ? "~/login" : $"~/{baseUrl}/login"; + + // Enable forms auth + var formsAuthConfiguration = new FormsAuthenticationConfiguration + { + RedirectUrl = redirect, + UserMapper = container.Resolve() + }; + + FormsAuthentication.Enable(pipelines, formsAuthConfiguration); + + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls; + ServicePointManager.ServerCertificateValidationCallback += + (sender, certificate, chain, sslPolicyErrors) => true; + + SubscribeAllObservers(container); + + } + + protected override void ConfigureConventions(NancyConventions nancyConventions) + { + base.ConfigureConventions(nancyConventions); + + var settings = new SettingsServiceV2(new SettingsJsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider())); + var assetLocation = settings.GetSettings().BaseUrl; + nancyConventions.StaticContentsConventions.Add( + StaticContentConventionBuilder.AddDirectory($"{assetLocation}/Content", "Content") + ); + + nancyConventions.StaticContentsConventions.AddDirectory($"{assetLocation}/docs", "swagger-ui"); + } + + protected override DiagnosticsConfiguration DiagnosticsConfiguration => new DiagnosticsConfiguration { Password = @"password" }; + + private void SubscribeAllObservers(TinyIoCContainer container) + { + var notificationService = container.Resolve(); + + var emailSettingsService = container.Resolve>(); + var emailSettings = emailSettingsService.GetSettings(); + if (emailSettings.Enabled) + { + notificationService.Subscribe(new EmailMessageNotification(emailSettingsService)); + } + + var pushbulletService = container.Resolve>(); + var pushbulletSettings = pushbulletService.GetSettings(); + if (pushbulletSettings.Enabled) + { + notificationService.Subscribe(new PushbulletNotification(container.Resolve(), pushbulletService)); + } + + var pushoverService = container.Resolve>(); + var pushoverSettings = pushoverService.GetSettings(); + if (pushoverSettings.Enabled) + { + notificationService.Subscribe(new PushoverNotification(container.Resolve(), pushoverService)); + } + + var slackService = container.Resolve>(); + var slackSettings = slackService.GetSettings(); + if (slackSettings.Enabled) + { + notificationService.Subscribe(new SlackNotification(container.Resolve(), slackService)); + } + } + + protected override void RequestStartup(TinyIoCContainer container, IPipelines pipelines, NancyContext context) + { + //CORS Enable + pipelines.AfterRequest.AddItemToEndOfPipeline((ctx) => + { + ctx.Response.WithHeader("Access-Control-Allow-Origin", "*") + .WithHeader("Access-Control-Allow-Methods", "POST,GET") + .WithHeader("Access-Control-Allow-Headers", "Accept, Origin, Content-type"); + + }); + base.RequestStartup(container, pipelines, context); + } + + private void ConfigureContainer(TinyIoCContainer container) + { + container.Register().AsSingleton(); + container.Register(new DbConfiguration(new SqliteFactory())); + container.Register, UserRepository>(); + container.Register(); + container.Register(); + container.Register, SettingsServiceV2>(); + container.Register, SettingsServiceV2>(); + container.Register, SettingsServiceV2>(); + container.Register, SettingsServiceV2>(); + container.Register, SettingsServiceV2>(); + + // Notification Service + container.Register().AsSingleton(); + // Settings + container.Register, SettingsServiceV2>(); + container.Register, SettingsServiceV2>(); + container.Register, SettingsServiceV2>(); + container.Register, SettingsServiceV2>(); + container.Register, SettingsServiceV2>(); + container.Register, SettingsServiceV2>(); + + container.Register, SettingsServiceV2>(); + container.Register, SettingsServiceV2>(); + container.Register, SettingsServiceV2>(); + + // Repo's + container.Register, GenericRepository>(); + container.Register, GenericRepository>(); + container.Register, GenericRepository>(); + container.Register, GenericRepository>(); + container.Register(); + container.Register(); + container.Register(); + container.Register(); + + // Services + container.Register(); + container.Register(); + container.Register(); + container.Register(); + container.Register(); + + container.Register(); + container.Register(); + container.Register(); + + + // Api + container.Register(); + container.Register(); + container.Register(); + container.Register(); + container.Register(); + container.Register(); + container.Register(); + container.Register(); + container.Register(); + + var loc = ServiceLocator.Instance; + loc.SetContainer(container); + } + } } \ No newline at end of file diff --git a/PlexRequests.UI/Modules/LandingPageModule.cs b/PlexRequests.UI/Modules/LandingPageModule.cs index 4564e32ef..9468662e6 100644 --- a/PlexRequests.UI/Modules/LandingPageModule.cs +++ b/PlexRequests.UI/Modules/LandingPageModule.cs @@ -58,6 +58,7 @@ namespace PlexRequests.UI.Modules private async Task Index() { + var s = await LandingSettings.GetSettingsAsync(); var model = new LandingPageViewModel { diff --git a/PlexRequests.UI/PlexRequests.UI.csproj b/PlexRequests.UI/PlexRequests.UI.csproj index 99b5f8641..c5681a18d 100644 --- a/PlexRequests.UI/PlexRequests.UI.csproj +++ b/PlexRequests.UI/PlexRequests.UI.csproj @@ -1,656 +1,660 @@ - - - - - Debug - AnyCPU - {68F5F5F3-B8BB-4911-875F-6F00AAE04EA6} - Exe - Properties - PlexRequests.UI - PlexRequests - v4.5 - 512 - ..\..\ - true - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - - - AnyCPU - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - AnyCPU - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\packages\Nancy.1.4.3\lib\net40\Nancy.dll - True - - - ..\packages\Nancy.Metadata.Modules.1.4.1\lib\net40\Nancy.Metadata.Modules.dll - True - - - ..\packages\Nancy.Swagger.0.1.0-alpha3\lib\net40\Nancy.Swagger.dll - True - - - ..\packages\NLog.4.3.4\lib\net45\NLog.dll - True - - - ..\packages\RestSharp.105.2.3\lib\net45\RestSharp.dll - True - - - ..\packages\Swagger.ObjectModel.0.1.0-alpha3\lib\net40\Swagger.ObjectModel.dll - True - - - - - - - - - - - - ..\packages\CommandLineParser.2.0.275-beta\lib\net45\CommandLine.dll - - - ..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll - - - ..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll - - - ..\packages\Dapper.1.42\lib\net45\Dapper.dll - - - ..\packages\FluentValidation.6.2.1.0\lib\Net45\FluentValidation.dll - - - ..\packages\MarkdownSharp.1.13.0.0\lib\35\MarkdownSharp.dll - - - ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll - - - ..\packages\Microsoft.Owin.Host.HttpListener.3.0.1\lib\net45\Microsoft.Owin.Host.HttpListener.dll - - - ..\packages\Microsoft.Owin.Host.SystemWeb.3.0.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll - - - ..\packages\Microsoft.Owin.Hosting.3.0.1\lib\net45\Microsoft.Owin.Hosting.dll - - - ..\Assemblies\Mono.Data.Sqlite.dll - - - ..\packages\Mono.Posix.4.0.0.0\lib\net40\Mono.Posix.dll - - - ..\packages\Nancy.Authentication.Basic.1.4.1\lib\net40\Nancy.Authentication.Basic.dll - - - ..\packages\Nancy.Authentication.Forms.1.4.1\lib\net40\Nancy.Authentication.Forms.dll - - - ..\packages\Nancy.Hosting.Self.1.4.1\lib\net40\Nancy.Hosting.Self.dll - - - ..\packages\Nancy.Owin.1.4.1\lib\net40\Nancy.Owin.dll - - - ..\packages\Nancy.Validation.FluentValidation.1.4.1\lib\net40\Nancy.Validation.FluentValidation.dll - - - ..\packages\Nancy.Viewengines.Razor.1.4.1\lib\net40\Nancy.ViewEngines.Razor.dll - - - ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll - - - ..\packages\Owin.1.0\lib\net40\Owin.dll - - - ..\packages\Quartz.2.3.3\lib\net40\Quartz.dll - - - ..\packages\Microsoft.AspNet.Razor.2.0.30506.0\lib\net40\System.Web.Razor.dll - - - ..\packages\TMDbLib.0.9.0.0-alpha\lib\net45\TMDbLib.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - base.scss - PreserveNewest - - - base.css - PreserveNewest - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - datepicker.scss - - - datepicker.css - Always - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - original.scss - PreserveNewest - - - original.css - PreserveNewest - - - plex.scss - PreserveNewest - - - plex.css - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - - - PreserveNewest - - - PreserveNewest - - - Always - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - Always - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - Always - - - moment.min.js - - - moment.min.es5.js - - - Always - - - pace.scss - - - pace.css - Always - - - PreserveNewest - - - PreserveNewest - - - - - Always - - - - compilerconfig.json - - - PreserveNewest - - - - - - - Always - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - PreserveNewest - - - Designer - - - Designer - - - Always - - - Designer - - - Always - - - Always - - - Always - - - Always - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - web.config - - - web.config - - - - - - {95834072-A675-415D-AA8F-877C91623810} - PlexRequests.Api.Interfaces - - - {CB37A5F8-6DFC-4554-99D3-A42B502E4591} - PlexRequests.Api.Models - - - {8CB8D235-2674-442D-9C6A-35FCAEEB160D} - PlexRequests.Api - - - {DD7DC444-D3BF-4027-8AB9-EFC71F5EC581} - PlexRequests.Core - - - {1252336D-42A3-482A-804C-836E60173DFA} - PlexRequests.Helpers - - - {566EFA49-68F8-4716-9693-A6B3F2624DEA} - PlexRequests.Services - - - {92433867-2B7B-477B-A566-96C382427525} - PlexRequests.Store - - - {ebe6fc1c-7b4b-47e9-af54-0ee0604a2be5} - PlexRequests.Updater - - - - - PreserveNewest - - - - - False - Microsoft .NET Framework 4.5.2 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 - false - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - - - - - - + + + + + Debug + AnyCPU + {68F5F5F3-B8BB-4911-875F-6F00AAE04EA6} + Exe + Properties + PlexRequests.UI + PlexRequests + v4.5 + 512 + ..\..\ + true + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Nancy.1.4.3\lib\net40\Nancy.dll + True + + + ..\packages\Nancy.Metadata.Modules.1.4.1\lib\net40\Nancy.Metadata.Modules.dll + True + + + ..\packages\Nancy.Swagger.0.1.0-alpha3\lib\net40\Nancy.Swagger.dll + True + + + ..\packages\NLog.4.3.4\lib\net45\NLog.dll + True + + + ..\packages\RestSharp.105.2.3\lib\net45\RestSharp.dll + True + + + ..\packages\Swagger.ObjectModel.0.1.0-alpha3\lib\net40\Swagger.ObjectModel.dll + True + + + + + + + + + + + + ..\packages\CommandLineParser.2.0.275-beta\lib\net45\CommandLine.dll + + + ..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll + + + ..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll + + + ..\packages\Dapper.1.42\lib\net45\Dapper.dll + + + ..\packages\FluentValidation.6.2.1.0\lib\Net45\FluentValidation.dll + + + ..\packages\MarkdownSharp.1.13.0.0\lib\35\MarkdownSharp.dll + + + ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll + + + ..\packages\Microsoft.Owin.Host.HttpListener.3.0.1\lib\net45\Microsoft.Owin.Host.HttpListener.dll + + + ..\packages\Microsoft.Owin.Host.SystemWeb.3.0.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll + + + ..\packages\Microsoft.Owin.Hosting.3.0.1\lib\net45\Microsoft.Owin.Hosting.dll + + + ..\Assemblies\Mono.Data.Sqlite.dll + + + ..\packages\Mono.Posix.4.0.0.0\lib\net40\Mono.Posix.dll + + + ..\packages\Nancy.Authentication.Basic.1.4.1\lib\net40\Nancy.Authentication.Basic.dll + + + ..\packages\Nancy.Authentication.Forms.1.4.1\lib\net40\Nancy.Authentication.Forms.dll + + + ..\packages\Nancy.Hosting.Self.1.4.1\lib\net40\Nancy.Hosting.Self.dll + + + ..\packages\Nancy.Owin.1.4.1\lib\net40\Nancy.Owin.dll + + + ..\packages\Nancy.Validation.FluentValidation.1.4.1\lib\net40\Nancy.Validation.FluentValidation.dll + + + ..\packages\Nancy.Viewengines.Razor.1.4.1\lib\net40\Nancy.ViewEngines.Razor.dll + + + ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll + + + ..\packages\Owin.1.0\lib\net40\Owin.dll + + + ..\packages\Quartz.2.3.3\lib\net40\Quartz.dll + + + ..\packages\Microsoft.AspNet.Razor.2.0.30506.0\lib\net40\System.Web.Razor.dll + + + ..\packages\TMDbLib.0.9.0.0-alpha\lib\net45\TMDbLib.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + base.scss + PreserveNewest + + + base.css + PreserveNewest + + + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + datepicker.scss + + + datepicker.css + Always + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + original.scss + PreserveNewest + + + original.css + PreserveNewest + + + plex.scss + PreserveNewest + + + plex.css + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + + + + PreserveNewest + + + PreserveNewest + + + Always + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Always + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Always + + + moment.min.js + + + moment.min.es5.js + + + Always + + + pace.scss + + + pace.css + Always + + + PreserveNewest + + + PreserveNewest + + + + + Always + + + + compilerconfig.json + + + PreserveNewest + + + + + + + Always + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + + PreserveNewest + + + Designer + + + Designer + + + Always + + + Designer + + + Always + + + Always + + + Always + + + Always + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + web.config + + + web.config + + + + + + {95834072-A675-415D-AA8F-877C91623810} + PlexRequests.Api.Interfaces + + + {CB37A5F8-6DFC-4554-99D3-A42B502E4591} + PlexRequests.Api.Models + + + {8CB8D235-2674-442D-9C6A-35FCAEEB160D} + PlexRequests.Api + + + {DD7DC444-D3BF-4027-8AB9-EFC71F5EC581} + PlexRequests.Core + + + {1252336D-42A3-482A-804C-836E60173DFA} + PlexRequests.Helpers + + + {9c266462-be82-461a-87a2-9edcfb95d732} + PlexRequests.Resources + + + {566EFA49-68F8-4716-9693-A6B3F2624DEA} + PlexRequests.Services + + + {92433867-2B7B-477B-A566-96C382427525} + PlexRequests.Store + + + {ebe6fc1c-7b4b-47e9-af54-0ee0604a2be5} + PlexRequests.Updater + + + + + PreserveNewest + + + + + False + Microsoft .NET Framework 4.5.2 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PlexRequests.UI/Startup.cs b/PlexRequests.UI/Startup.cs index 14aa38657..6f7f5fd8c 100644 --- a/PlexRequests.UI/Startup.cs +++ b/PlexRequests.UI/Startup.cs @@ -1,59 +1,59 @@ -#region Copyright -// /************************************************************************ -// Copyright (c) 2016 Jamie Rees -// File: Startup.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 Nancy.TinyIoc; - -using NLog; - -using Owin; - -using PlexRequests.UI.Helpers; -using PlexRequests.UI.Jobs; - -namespace PlexRequests.UI -{ - public class Startup - { - private static readonly Logger Log = LogManager.GetCurrentClassLogger(); - - public void Configuration(IAppBuilder app) - { - try - { - app.UseNancy(); - var scheduler = new Scheduler(); - scheduler.StartScheduler(); - } - catch (Exception exception) - { - Log.Fatal(exception); - throw; - } - } - } +#region Copyright +// /************************************************************************ +// Copyright (c) 2016 Jamie Rees +// File: Startup.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 Nancy.TinyIoc; + +using NLog; + +using Owin; + +using PlexRequests.UI.Helpers; +using PlexRequests.UI.Jobs; + +namespace PlexRequests.UI +{ + public class Startup + { + private static readonly Logger Log = LogManager.GetCurrentClassLogger(); + + public void Configuration(IAppBuilder app) + { + try + { + app.UseNancy(); + var scheduler = new Scheduler(); + scheduler.StartScheduler(); + } + catch (Exception exception) + { + Log.Fatal(exception); + throw; + } + } + } } \ No newline at end of file diff --git a/PlexRequests.UI/Views/UserLogin/Index.cshtml b/PlexRequests.UI/Views/UserLogin/Index.cshtml index ff2d574ff..92bf86778 100644 --- a/PlexRequests.UI/Views/UserLogin/Index.cshtml +++ b/PlexRequests.UI/Views/UserLogin/Index.cshtml @@ -1,70 +1,70 @@ -@using PlexRequests.UI.Helpers -
-

Login

-
-

- Want to watch a movie or tv show but it's not currently on Plex? - Login below with your Plex.tv username and password! -

-
-
-
-
- -
-
- -
-
-
- @if (Model.UsePassword) - { -
-
- -
-
- -
-
-
- } - - -
-
- - \ No newline at end of file diff --git a/PlexRequests.UI/app.config b/PlexRequests.UI/app.config index 747d7cb7a..1de7c9330 100644 --- a/PlexRequests.UI/app.config +++ b/PlexRequests.UI/app.config @@ -1,50 +1,50 @@ - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PlexRequests.sln b/PlexRequests.sln index 93ac3b1f4..5bad74ef5 100644 --- a/PlexRequests.sln +++ b/PlexRequests.sln @@ -1,102 +1,108 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25123.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.UI", "PlexRequests.UI\PlexRequests.UI.csproj", "{68F5F5F3-B8BB-4911-875F-6F00AAE04EA6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Api", "PlexRequests.Api\PlexRequests.Api.csproj", "{8CB8D235-2674-442D-9C6A-35FCAEEB160D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Api.Interfaces", "PlexRequests.Api.Interfaces\PlexRequests.Api.Interfaces.csproj", "{95834072-A675-415D-AA8F-877C91623810}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Core", "PlexRequests.Core\PlexRequests.Core.csproj", "{DD7DC444-D3BF-4027-8AB9-EFC71F5EC581}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Store", "PlexRequests.Store\PlexRequests.Store.csproj", "{92433867-2B7B-477B-A566-96C382427525}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F4BC839C-B8FF-48BE-B22E-536A0A0A81A5}" - ProjectSection(SolutionItems) = preProject - .travis.yml = .travis.yml - appveyor.yml = appveyor.yml - LICENSE = LICENSE - README.md = README.md - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Helpers", "PlexRequests.Helpers\PlexRequests.Helpers.csproj", "{1252336D-42A3-482A-804C-836E60173DFA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.UI.Tests", "PlexRequests.UI.Tests\PlexRequests.UI.Tests.csproj", "{A930E2CF-79E2-45F9-B06A-9A719A254CE4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Core.Tests", "PlexRequests.Core.Tests\PlexRequests.Core.Tests.csproj", "{FCFECD5D-47F6-454D-8692-E27A921BE655}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Services", "PlexRequests.Services\PlexRequests.Services.csproj", "{566EFA49-68F8-4716-9693-A6B3F2624DEA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Api.Models", "PlexRequests.Api.Models\PlexRequests.Api.Models.csproj", "{CB37A5F8-6DFC-4554-99D3-A42B502E4591}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Services.Tests", "PlexRequests.Services.Tests\PlexRequests.Services.Tests.csproj", "{EAADB4AC-064F-4D3A-AFF9-64A33131A9A7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Updater", "PlexRequests.Updater\PlexRequests.Updater.csproj", "{EBE6FC1C-7B4B-47E9-AF54-0EE0604A2BE5}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Helpers.Tests", "PlexRequests.Helpers.Tests\PlexRequests.Helpers.Tests.csproj", "{0E6395D3-B074-49E8-898D-0EB99E507E0E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {68F5F5F3-B8BB-4911-875F-6F00AAE04EA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {68F5F5F3-B8BB-4911-875F-6F00AAE04EA6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {68F5F5F3-B8BB-4911-875F-6F00AAE04EA6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {68F5F5F3-B8BB-4911-875F-6F00AAE04EA6}.Release|Any CPU.Build.0 = Release|Any CPU - {8CB8D235-2674-442D-9C6A-35FCAEEB160D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8CB8D235-2674-442D-9C6A-35FCAEEB160D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8CB8D235-2674-442D-9C6A-35FCAEEB160D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8CB8D235-2674-442D-9C6A-35FCAEEB160D}.Release|Any CPU.Build.0 = Release|Any CPU - {95834072-A675-415D-AA8F-877C91623810}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {95834072-A675-415D-AA8F-877C91623810}.Debug|Any CPU.Build.0 = Debug|Any CPU - {95834072-A675-415D-AA8F-877C91623810}.Release|Any CPU.ActiveCfg = Release|Any CPU - {95834072-A675-415D-AA8F-877C91623810}.Release|Any CPU.Build.0 = Release|Any CPU - {DD7DC444-D3BF-4027-8AB9-EFC71F5EC581}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DD7DC444-D3BF-4027-8AB9-EFC71F5EC581}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DD7DC444-D3BF-4027-8AB9-EFC71F5EC581}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DD7DC444-D3BF-4027-8AB9-EFC71F5EC581}.Release|Any CPU.Build.0 = Release|Any CPU - {92433867-2B7B-477B-A566-96C382427525}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {92433867-2B7B-477B-A566-96C382427525}.Debug|Any CPU.Build.0 = Debug|Any CPU - {92433867-2B7B-477B-A566-96C382427525}.Release|Any CPU.ActiveCfg = Release|Any CPU - {92433867-2B7B-477B-A566-96C382427525}.Release|Any CPU.Build.0 = Release|Any CPU - {1252336D-42A3-482A-804C-836E60173DFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1252336D-42A3-482A-804C-836E60173DFA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1252336D-42A3-482A-804C-836E60173DFA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1252336D-42A3-482A-804C-836E60173DFA}.Release|Any CPU.Build.0 = Release|Any CPU - {A930E2CF-79E2-45F9-B06A-9A719A254CE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A930E2CF-79E2-45F9-B06A-9A719A254CE4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A930E2CF-79E2-45F9-B06A-9A719A254CE4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A930E2CF-79E2-45F9-B06A-9A719A254CE4}.Release|Any CPU.Build.0 = Release|Any CPU - {FCFECD5D-47F6-454D-8692-E27A921BE655}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FCFECD5D-47F6-454D-8692-E27A921BE655}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FCFECD5D-47F6-454D-8692-E27A921BE655}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FCFECD5D-47F6-454D-8692-E27A921BE655}.Release|Any CPU.Build.0 = Release|Any CPU - {566EFA49-68F8-4716-9693-A6B3F2624DEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {566EFA49-68F8-4716-9693-A6B3F2624DEA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {566EFA49-68F8-4716-9693-A6B3F2624DEA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {566EFA49-68F8-4716-9693-A6B3F2624DEA}.Release|Any CPU.Build.0 = Release|Any CPU - {CB37A5F8-6DFC-4554-99D3-A42B502E4591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CB37A5F8-6DFC-4554-99D3-A42B502E4591}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CB37A5F8-6DFC-4554-99D3-A42B502E4591}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CB37A5F8-6DFC-4554-99D3-A42B502E4591}.Release|Any CPU.Build.0 = Release|Any CPU - {EAADB4AC-064F-4D3A-AFF9-64A33131A9A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EAADB4AC-064F-4D3A-AFF9-64A33131A9A7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EAADB4AC-064F-4D3A-AFF9-64A33131A9A7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EAADB4AC-064F-4D3A-AFF9-64A33131A9A7}.Release|Any CPU.Build.0 = Release|Any CPU - {EBE6FC1C-7B4B-47E9-AF54-0EE0604A2BE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EBE6FC1C-7B4B-47E9-AF54-0EE0604A2BE5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EBE6FC1C-7B4B-47E9-AF54-0EE0604A2BE5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EBE6FC1C-7B4B-47E9-AF54-0EE0604A2BE5}.Release|Any CPU.Build.0 = Release|Any CPU - {0E6395D3-B074-49E8-898D-0EB99E507E0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0E6395D3-B074-49E8-898D-0EB99E507E0E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0E6395D3-B074-49E8-898D-0EB99E507E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0E6395D3-B074-49E8-898D-0EB99E507E0E}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.UI", "PlexRequests.UI\PlexRequests.UI.csproj", "{68F5F5F3-B8BB-4911-875F-6F00AAE04EA6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Api", "PlexRequests.Api\PlexRequests.Api.csproj", "{8CB8D235-2674-442D-9C6A-35FCAEEB160D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Api.Interfaces", "PlexRequests.Api.Interfaces\PlexRequests.Api.Interfaces.csproj", "{95834072-A675-415D-AA8F-877C91623810}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Core", "PlexRequests.Core\PlexRequests.Core.csproj", "{DD7DC444-D3BF-4027-8AB9-EFC71F5EC581}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Store", "PlexRequests.Store\PlexRequests.Store.csproj", "{92433867-2B7B-477B-A566-96C382427525}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F4BC839C-B8FF-48BE-B22E-536A0A0A81A5}" + ProjectSection(SolutionItems) = preProject + .travis.yml = .travis.yml + appveyor.yml = appveyor.yml + LICENSE = LICENSE + README.md = README.md + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Helpers", "PlexRequests.Helpers\PlexRequests.Helpers.csproj", "{1252336D-42A3-482A-804C-836E60173DFA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.UI.Tests", "PlexRequests.UI.Tests\PlexRequests.UI.Tests.csproj", "{A930E2CF-79E2-45F9-B06A-9A719A254CE4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Core.Tests", "PlexRequests.Core.Tests\PlexRequests.Core.Tests.csproj", "{FCFECD5D-47F6-454D-8692-E27A921BE655}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Services", "PlexRequests.Services\PlexRequests.Services.csproj", "{566EFA49-68F8-4716-9693-A6B3F2624DEA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Api.Models", "PlexRequests.Api.Models\PlexRequests.Api.Models.csproj", "{CB37A5F8-6DFC-4554-99D3-A42B502E4591}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Services.Tests", "PlexRequests.Services.Tests\PlexRequests.Services.Tests.csproj", "{EAADB4AC-064F-4D3A-AFF9-64A33131A9A7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Updater", "PlexRequests.Updater\PlexRequests.Updater.csproj", "{EBE6FC1C-7B4B-47E9-AF54-0EE0604A2BE5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Helpers.Tests", "PlexRequests.Helpers.Tests\PlexRequests.Helpers.Tests.csproj", "{0E6395D3-B074-49E8-898D-0EB99E507E0E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Resources", "PlexRequests.Resources\PlexRequests.Resources.csproj", "{9C266462-BE82-461A-87A2-9EDCFB95D732}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {68F5F5F3-B8BB-4911-875F-6F00AAE04EA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {68F5F5F3-B8BB-4911-875F-6F00AAE04EA6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {68F5F5F3-B8BB-4911-875F-6F00AAE04EA6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {68F5F5F3-B8BB-4911-875F-6F00AAE04EA6}.Release|Any CPU.Build.0 = Release|Any CPU + {8CB8D235-2674-442D-9C6A-35FCAEEB160D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8CB8D235-2674-442D-9C6A-35FCAEEB160D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8CB8D235-2674-442D-9C6A-35FCAEEB160D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8CB8D235-2674-442D-9C6A-35FCAEEB160D}.Release|Any CPU.Build.0 = Release|Any CPU + {95834072-A675-415D-AA8F-877C91623810}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {95834072-A675-415D-AA8F-877C91623810}.Debug|Any CPU.Build.0 = Debug|Any CPU + {95834072-A675-415D-AA8F-877C91623810}.Release|Any CPU.ActiveCfg = Release|Any CPU + {95834072-A675-415D-AA8F-877C91623810}.Release|Any CPU.Build.0 = Release|Any CPU + {DD7DC444-D3BF-4027-8AB9-EFC71F5EC581}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DD7DC444-D3BF-4027-8AB9-EFC71F5EC581}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DD7DC444-D3BF-4027-8AB9-EFC71F5EC581}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DD7DC444-D3BF-4027-8AB9-EFC71F5EC581}.Release|Any CPU.Build.0 = Release|Any CPU + {92433867-2B7B-477B-A566-96C382427525}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {92433867-2B7B-477B-A566-96C382427525}.Debug|Any CPU.Build.0 = Debug|Any CPU + {92433867-2B7B-477B-A566-96C382427525}.Release|Any CPU.ActiveCfg = Release|Any CPU + {92433867-2B7B-477B-A566-96C382427525}.Release|Any CPU.Build.0 = Release|Any CPU + {1252336D-42A3-482A-804C-836E60173DFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1252336D-42A3-482A-804C-836E60173DFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1252336D-42A3-482A-804C-836E60173DFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1252336D-42A3-482A-804C-836E60173DFA}.Release|Any CPU.Build.0 = Release|Any CPU + {A930E2CF-79E2-45F9-B06A-9A719A254CE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A930E2CF-79E2-45F9-B06A-9A719A254CE4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A930E2CF-79E2-45F9-B06A-9A719A254CE4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A930E2CF-79E2-45F9-B06A-9A719A254CE4}.Release|Any CPU.Build.0 = Release|Any CPU + {FCFECD5D-47F6-454D-8692-E27A921BE655}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FCFECD5D-47F6-454D-8692-E27A921BE655}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FCFECD5D-47F6-454D-8692-E27A921BE655}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FCFECD5D-47F6-454D-8692-E27A921BE655}.Release|Any CPU.Build.0 = Release|Any CPU + {566EFA49-68F8-4716-9693-A6B3F2624DEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {566EFA49-68F8-4716-9693-A6B3F2624DEA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {566EFA49-68F8-4716-9693-A6B3F2624DEA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {566EFA49-68F8-4716-9693-A6B3F2624DEA}.Release|Any CPU.Build.0 = Release|Any CPU + {CB37A5F8-6DFC-4554-99D3-A42B502E4591}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB37A5F8-6DFC-4554-99D3-A42B502E4591}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB37A5F8-6DFC-4554-99D3-A42B502E4591}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB37A5F8-6DFC-4554-99D3-A42B502E4591}.Release|Any CPU.Build.0 = Release|Any CPU + {EAADB4AC-064F-4D3A-AFF9-64A33131A9A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EAADB4AC-064F-4D3A-AFF9-64A33131A9A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EAADB4AC-064F-4D3A-AFF9-64A33131A9A7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EAADB4AC-064F-4D3A-AFF9-64A33131A9A7}.Release|Any CPU.Build.0 = Release|Any CPU + {EBE6FC1C-7B4B-47E9-AF54-0EE0604A2BE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EBE6FC1C-7B4B-47E9-AF54-0EE0604A2BE5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EBE6FC1C-7B4B-47E9-AF54-0EE0604A2BE5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EBE6FC1C-7B4B-47E9-AF54-0EE0604A2BE5}.Release|Any CPU.Build.0 = Release|Any CPU + {0E6395D3-B074-49E8-898D-0EB99E507E0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E6395D3-B074-49E8-898D-0EB99E507E0E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E6395D3-B074-49E8-898D-0EB99E507E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E6395D3-B074-49E8-898D-0EB99E507E0E}.Release|Any CPU.Build.0 = Release|Any CPU + {9C266462-BE82-461A-87A2-9EDCFB95D732}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C266462-BE82-461A-87A2-9EDCFB95D732}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C266462-BE82-461A-87A2-9EDCFB95D732}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C266462-BE82-461A-87A2-9EDCFB95D732}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal From 2ec27dce902dc424c854894e2f5e92b837787611 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 24 Jun 2016 10:06:03 +0100 Subject: [PATCH 10/36] Implemented the different languages and added the ability to change cultures. #243 --- .../PlexRequests.Resources.csproj | 7 + PlexRequests.Resources/UI.da.resx | 147 ++++++++++++++++++ PlexRequests.Resources/UI.de.resx | 147 ++++++++++++++++++ PlexRequests.Resources/UI.es.resx | 147 ++++++++++++++++++ PlexRequests.Resources/UI.fr.resx | 147 ++++++++++++++++++ PlexRequests.Resources/UI.it.resx | 147 ++++++++++++++++++ PlexRequests.Resources/UI.pt.resx | 147 ++++++++++++++++++ PlexRequests.Resources/UI.sv.resx | 147 ++++++++++++++++++ PlexRequests.UI/Helpers/CultureHelper.cs | 116 ++++++++++++++ PlexRequests.UI/Modules/CultureModule.cs | 63 ++++++++ PlexRequests.UI/PlexRequests.UI.csproj | 2 + 11 files changed, 1217 insertions(+) create mode 100644 PlexRequests.Resources/UI.da.resx create mode 100644 PlexRequests.Resources/UI.de.resx create mode 100644 PlexRequests.Resources/UI.es.resx create mode 100644 PlexRequests.Resources/UI.fr.resx create mode 100644 PlexRequests.Resources/UI.it.resx create mode 100644 PlexRequests.Resources/UI.pt.resx create mode 100644 PlexRequests.Resources/UI.sv.resx create mode 100644 PlexRequests.UI/Helpers/CultureHelper.cs create mode 100644 PlexRequests.UI/Modules/CultureModule.cs diff --git a/PlexRequests.Resources/PlexRequests.Resources.csproj b/PlexRequests.Resources/PlexRequests.Resources.csproj index 4499431cf..2b4d447c8 100644 --- a/PlexRequests.Resources/PlexRequests.Resources.csproj +++ b/PlexRequests.Resources/PlexRequests.Resources.csproj @@ -48,10 +48,17 @@ + + + + + + PublicResXFileCodeGenerator UI.Designer.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Log ind + + + Ønsker du at se en film eller tv-show, men det er i øjeblikket ikke på Plex? Log nedenfor med dit Plex.tv brugernavn og password !! + + + Dine login-oplysninger bruges kun til at godkende din Plex konto.! + + + Plex.tv Brugernavn + + + Brugernavn + + + Adgangskode + + + log på + + + Noget gik galt + + + Fuldført + + \ No newline at end of file diff --git a/PlexRequests.Resources/UI.de.resx b/PlexRequests.Resources/UI.de.resx new file mode 100644 index 000000000..f4a0fb0fc --- /dev/null +++ b/PlexRequests.Resources/UI.de.resx @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Anmelden + + + Möchten Sie einen Film oder eine TV-Show zu sehen, aber es ist derzeit nicht auf Plex? Loggen Sie sich unten mit Ihrem Plex.tv Benutzernamen und Passwort !! + + + Ihre Login-Daten werden verwendet, nur Ihr Plex Konto zu authentifizieren.! + + + Plex.tv Benutzername! + + + Benutzername + + + Passwort + + + Anmelden! + + + Irgendetwas ist falsch gelaufen + + + Erfolg + + \ No newline at end of file diff --git a/PlexRequests.Resources/UI.es.resx b/PlexRequests.Resources/UI.es.resx new file mode 100644 index 000000000..26660b94a --- /dev/null +++ b/PlexRequests.Resources/UI.es.resx @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + INICIAR SESIÓN + + + ¿Quieres ver una película o programa de televisión, pero no es actualmente en Plex? Ingresa abajo con su nombre de usuario y contraseña Plex.tv !! + + + Sus datos de acceso sólo se utilizan para autenticar su cuenta Plex.! + + + Plex.tv nombre de usuario! + + + Username + + + Contraseña + + + Iniciar sesión + + + Algo salió mal. + + + CRÍTICOS + + \ No newline at end of file diff --git a/PlexRequests.Resources/UI.fr.resx b/PlexRequests.Resources/UI.fr.resx new file mode 100644 index 000000000..88c16161d --- /dev/null +++ b/PlexRequests.Resources/UI.fr.resx @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Se connecter + + + Vous voulez regarder un film ou la télévision, mais il est pas actuellement sur Plex? Connectez-vous ci-dessous avec votre nom d'utilisateur et mot de passe Plex.tv! + + + Vos informations de connexion sont uniquement utilisées pour authentifier votre compte Plex. + + + Plex.tv Nom d'utilisateur + + + Nom d’utilisateur + + + Mot de passe + + + Se connecter! + + + Quelque-chose s'est mal passé! + + + Succès + + \ No newline at end of file diff --git a/PlexRequests.Resources/UI.it.resx b/PlexRequests.Resources/UI.it.resx new file mode 100644 index 000000000..29746d173 --- /dev/null +++ b/PlexRequests.Resources/UI.it.resx @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Login + + + Vuoi guardare un film o tv ma non è attualmente in Plex? Effettua il login con il tuo username e la password Plex.tv !! + + + I dati di accesso vengono utilizzati solo per autenticare l'account Plex.! + + + Plex.tv Nome utente! + + + Nome utente + + + Password + + + Accedi! + + + Errore + + + Successo + + \ No newline at end of file diff --git a/PlexRequests.Resources/UI.pt.resx b/PlexRequests.Resources/UI.pt.resx new file mode 100644 index 000000000..a21345cdb --- /dev/null +++ b/PlexRequests.Resources/UI.pt.resx @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Login + + + Quer assistir a um filme ou programa de TV, mas não está atualmente em Plex? Entre abaixo com seu nome de usuário e senha Plex.tv !! + + + Seus dados de login são apenas usados ​​para autenticar sua conta Plex.! + + + Plex.tv usuário! + + + Nome de usuário + + + Senha + + + Assinar em! + + + Alguma coisa saiu errada. + + + Sucesso + + \ No newline at end of file diff --git a/PlexRequests.Resources/UI.sv.resx b/PlexRequests.Resources/UI.sv.resx new file mode 100644 index 000000000..f5ae3b249 --- /dev/null +++ b/PlexRequests.Resources/UI.sv.resx @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Logga in + + + Vill du titta på en film eller TV-show, men det är inte närvarande på Plex? Logga in nedan med Plex.tv användarnamn och lösenord !! + + + Dina inloggningsuppgifter används endast för att autentisera ditt Plex-konto.! + + + Plex.tv användarnamn! + + + Användarnamn + + + Lösenord + + + Logga in! + + + Något gick fel + + + Lyckades + + \ No newline at end of file diff --git a/PlexRequests.UI/Helpers/CultureHelper.cs b/PlexRequests.UI/Helpers/CultureHelper.cs new file mode 100644 index 000000000..e78758585 --- /dev/null +++ b/PlexRequests.UI/Helpers/CultureHelper.cs @@ -0,0 +1,116 @@ +#region Copyright +// /************************************************************************ +// Copyright (c) 2016 Jamie Rees +// File: CultureHelper.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; +using System.Linq; +using System.Threading; + +namespace PlexRequests.UI.Helpers +{ + public class CultureHelper + { + private static readonly List ValidCultures = new List { "en-US", "de-DE", "fr-FR", "es-ES", "de", "en", "fr", "es","da","sv","it" }; + + private static readonly List ImplimentedCultures = new List { + "en-US", + "en", + "de", + "fr", + "es", + "da", + "sv", + "it" + }; + + /// + /// Returns true if the language is a right-to-left language. + /// + public static bool IsRighToLeft() + { + return Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft; + } + + /// + /// Returns a valid culture name based on "name" parameter. If "name" is not valid, it returns the default culture "en-US" + /// + /// Culture's name (e.g. en-US) + public static string GetImplementedCulture(string name) + { + if (string.IsNullOrEmpty(name)) + { + return GetDefaultCulture(); + } + + // Validate the culture + if (!ValidCultures.Any(c => c.Equals(name, StringComparison.InvariantCultureIgnoreCase))) + { + return GetDefaultCulture(); + } + + if (ImplimentedCultures.Any(c => c.Equals(name, StringComparison.InvariantCultureIgnoreCase))) + { + return name; // We do have the culture, lets go with it + } + + // Find a close match. + var match = GetNeutralCulture(name); + + foreach (var c in ImplimentedCultures.Where(c => c.StartsWith(match, StringComparison.InvariantCultureIgnoreCase))) + { + return c; + } + + return GetDefaultCulture(); // return Default culture since we cannot find anything + } + + /// + /// Returns default culture name which is the first name declared (e.g. en-US) + /// + /// Culture string e.g. en-US + public static string GetDefaultCulture() + { + return ImplimentedCultures[0]; // return first culture + } + + public static string GetCurrentCulture() + { + return Thread.CurrentThread.CurrentCulture.Name; + } + + public static string GetCurrentNeutralCulture() + { + return GetNeutralCulture(Thread.CurrentThread.CurrentCulture.Name); + } + + public static string GetNeutralCulture(string name) + { + if (!name.Contains("-")) return name; + + return name.Split('-')[0]; // Read first part only + } + } +} \ No newline at end of file diff --git a/PlexRequests.UI/Modules/CultureModule.cs b/PlexRequests.UI/Modules/CultureModule.cs new file mode 100644 index 000000000..6ce1b3a11 --- /dev/null +++ b/PlexRequests.UI/Modules/CultureModule.cs @@ -0,0 +1,63 @@ +#region Copyright +// /************************************************************************ +// Copyright (c) 2016 Jamie Rees +// File: CultureModule.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 Nancy; +using Nancy.Extensions; +using Nancy.Responses; + +using PlexRequests.Core; +using PlexRequests.Core.SettingModels; +using PlexRequests.UI.Helpers; + +namespace PlexRequests.UI.Modules +{ + public class CultureModule : BaseModule + { + private const string CookieName = "_culture"; + public CultureModule(ISettingsService pr) : base("culture",pr) + { + Get["/culture"] = x => SetCulture(); + } + + public RedirectResponse SetCulture() + { + var culture = (string)Request.Query["culture"]; + var returnUrl = (string)Request.Query["returnUrl"]; + + // Validate + culture = CultureHelper.GetImplementedCulture(culture); + + var cookie = Request.Cookies["_culture"]; + var response = Context.GetRedirect(returnUrl); + + response.WithCookie(CookieName, cookie ?? culture, DateTime.Now.AddYears(1)); + + return response; + } + } +} \ No newline at end of file diff --git a/PlexRequests.UI/PlexRequests.UI.csproj b/PlexRequests.UI/PlexRequests.UI.csproj index c5681a18d..39162d60e 100644 --- a/PlexRequests.UI/PlexRequests.UI.csproj +++ b/PlexRequests.UI/PlexRequests.UI.csproj @@ -159,6 +159,7 @@ + @@ -196,6 +197,7 @@ + From bcdb612faaabb03e76c8109153c22cd7ed70a6ec Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 24 Jun 2016 11:05:03 +0100 Subject: [PATCH 11/36] Added languages #243 --- .../PlexRequests.Resources.csproj | 18 -- PlexRequests.UI/Modules/BaseModule.cs | 46 ++++- PlexRequests.UI/Modules/CultureModule.cs | 17 +- PlexRequests.UI/PlexRequests.UI.csproj | 23 ++- .../Resources}/UI.Designer.cs | 166 +++++++++++++++++- .../Resources}/UI.da.resx | 54 ++++++ .../Resources}/UI.de.resx | 54 ++++++ .../Resources}/UI.es.resx | 54 ++++++ .../Resources}/UI.fr.resx | 54 ++++++ .../Resources}/UI.it.resx | 54 ++++++ .../Resources}/UI.pt.resx | 54 ++++++ .../Resources}/UI.resx | 54 ++++++ .../Resources}/UI.sv.resx | 54 ++++++ PlexRequests.UI/Views/Shared/_Layout.cshtml | 38 ++-- PlexRequests.UI/Views/UserLogin/Index.cshtml | 4 +- PlexRequests.sln | 6 - 16 files changed, 700 insertions(+), 50 deletions(-) rename {PlexRequests.Resources => PlexRequests.UI/Resources}/UI.Designer.cs (50%) rename {PlexRequests.Resources => PlexRequests.UI/Resources}/UI.da.resx (80%) rename {PlexRequests.Resources => PlexRequests.UI/Resources}/UI.de.resx (79%) rename {PlexRequests.Resources => PlexRequests.UI/Resources}/UI.es.resx (79%) rename {PlexRequests.Resources => PlexRequests.UI/Resources}/UI.fr.resx (79%) rename {PlexRequests.Resources => PlexRequests.UI/Resources}/UI.it.resx (79%) rename {PlexRequests.Resources => PlexRequests.UI/Resources}/UI.pt.resx (79%) rename {PlexRequests.Resources => PlexRequests.UI/Resources}/UI.resx (76%) rename {PlexRequests.Resources => PlexRequests.UI/Resources}/UI.sv.resx (79%) diff --git a/PlexRequests.Resources/PlexRequests.Resources.csproj b/PlexRequests.Resources/PlexRequests.Resources.csproj index 2b4d447c8..2179f207a 100644 --- a/PlexRequests.Resources/PlexRequests.Resources.csproj +++ b/PlexRequests.Resources/PlexRequests.Resources.csproj @@ -41,24 +41,6 @@ - - True - True - UI.resx - - - - - - - - - - - PublicResXFileCodeGenerator - UI.Designer.cs - - @Html.LoadAnalytics() @@ -32,17 +33,17 @@ - Plex Requests + @UI.Layout_Title
@@ -101,7 +115,7 @@ success: function (response) { if (response.updateAvailable) { var status = createBaseUrl(urlBase, '/admin/status'); - $('#updateAvailable').html(" There is a new update available! Click Here!"); + $('#updateAvailable').html(" @UI.Layout_UpdateAvailablePart1 @UI.Layout_UpdateAvailablePart2"); $('#updateAvailable').removeAttr("hidden"); $('body').addClass('update-available'); } diff --git a/PlexRequests.UI/Views/UserLogin/Index.cshtml b/PlexRequests.UI/Views/UserLogin/Index.cshtml index 92bf86778..0c04b8f7b 100644 --- a/PlexRequests.UI/Views/UserLogin/Index.cshtml +++ b/PlexRequests.UI/Views/UserLogin/Index.cshtml @@ -1,5 +1,5 @@ -@using PlexRequests.Resources -@using PlexRequests.UI.Helpers +@using PlexRequests.UI.Helpers +@using PlexRequests.UI.Resources

@UI.UserLogin_Title

diff --git a/PlexRequests.sln b/PlexRequests.sln index 5bad74ef5..14ef8a36e 100644 --- a/PlexRequests.sln +++ b/PlexRequests.sln @@ -37,8 +37,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Updater", "Ple EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Helpers.Tests", "PlexRequests.Helpers.Tests\PlexRequests.Helpers.Tests.csproj", "{0E6395D3-B074-49E8-898D-0EB99E507E0E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlexRequests.Resources", "PlexRequests.Resources\PlexRequests.Resources.csproj", "{9C266462-BE82-461A-87A2-9EDCFB95D732}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -97,10 +95,6 @@ Global {0E6395D3-B074-49E8-898D-0EB99E507E0E}.Debug|Any CPU.Build.0 = Debug|Any CPU {0E6395D3-B074-49E8-898D-0EB99E507E0E}.Release|Any CPU.ActiveCfg = Release|Any CPU {0E6395D3-B074-49E8-898D-0EB99E507E0E}.Release|Any CPU.Build.0 = Release|Any CPU - {9C266462-BE82-461A-87A2-9EDCFB95D732}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9C266462-BE82-461A-87A2-9EDCFB95D732}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9C266462-BE82-461A-87A2-9EDCFB95D732}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9C266462-BE82-461A-87A2-9EDCFB95D732}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 635fc03c020a7b381ea9fd9bf02a926f43c952d9 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 24 Jun 2016 11:21:08 +0100 Subject: [PATCH 12/36] Added Dutch language #243 --- PlexRequests.UI/Helpers/CultureHelper.cs | 5 +- PlexRequests.UI/PlexRequests.UI.csproj | 1 + PlexRequests.UI/Resources/UI.Designer.cs | 9 + PlexRequests.UI/Resources/UI.da.resx | 3 + PlexRequests.UI/Resources/UI.de.resx | 3 + PlexRequests.UI/Resources/UI.es.resx | 3 + PlexRequests.UI/Resources/UI.fr.resx | 3 + PlexRequests.UI/Resources/UI.it.resx | 3 + PlexRequests.UI/Resources/UI.nl.resx | 204 ++++++++++++++++++++ PlexRequests.UI/Resources/UI.pt.resx | 3 + PlexRequests.UI/Resources/UI.resx | 3 + PlexRequests.UI/Resources/UI.sv.resx | 3 + PlexRequests.UI/Views/Shared/_Layout.cshtml | 1 + 13 files changed, 242 insertions(+), 2 deletions(-) create mode 100644 PlexRequests.UI/Resources/UI.nl.resx diff --git a/PlexRequests.UI/Helpers/CultureHelper.cs b/PlexRequests.UI/Helpers/CultureHelper.cs index e78758585..d933d758f 100644 --- a/PlexRequests.UI/Helpers/CultureHelper.cs +++ b/PlexRequests.UI/Helpers/CultureHelper.cs @@ -33,7 +33,7 @@ namespace PlexRequests.UI.Helpers { public class CultureHelper { - private static readonly List ValidCultures = new List { "en-US", "de-DE", "fr-FR", "es-ES", "de", "en", "fr", "es","da","sv","it" }; + private static readonly List ValidCultures = new List { "en-US", "de-DE", "fr-FR", "es-ES", "de", "en", "fr", "es","da","sv","it","nl" }; private static readonly List ImplimentedCultures = new List { "en-US", @@ -43,7 +43,8 @@ namespace PlexRequests.UI.Helpers "es", "da", "sv", - "it" + "it", + "nl" }; /// diff --git a/PlexRequests.UI/PlexRequests.UI.csproj b/PlexRequests.UI/PlexRequests.UI.csproj index 26f053187..126f0754b 100644 --- a/PlexRequests.UI/PlexRequests.UI.csproj +++ b/PlexRequests.UI/PlexRequests.UI.csproj @@ -582,6 +582,7 @@ + PublicResXFileCodeGenerator diff --git a/PlexRequests.UI/Resources/UI.Designer.cs b/PlexRequests.UI/Resources/UI.Designer.cs index 33937e7c5..4e14e9f44 100644 --- a/PlexRequests.UI/Resources/UI.Designer.cs +++ b/PlexRequests.UI/Resources/UI.Designer.cs @@ -114,6 +114,15 @@ namespace PlexRequests.UI.Resources { } } + /// + /// Looks up a localized string similar to Dutch. + /// + public static string Layout_Dutch { + get { + return ResourceManager.GetString("Layout_Dutch", resourceCulture); + } + } + /// /// Looks up a localized string similar to English. /// diff --git a/PlexRequests.UI/Resources/UI.da.resx b/PlexRequests.UI/Resources/UI.da.resx index e808eb106..93ca45995 100644 --- a/PlexRequests.UI/Resources/UI.da.resx +++ b/PlexRequests.UI/Resources/UI.da.resx @@ -198,4 +198,7 @@ her + + Hollandsk + \ No newline at end of file diff --git a/PlexRequests.UI/Resources/UI.de.resx b/PlexRequests.UI/Resources/UI.de.resx index 765ab5255..6c3cd2089 100644 --- a/PlexRequests.UI/Resources/UI.de.resx +++ b/PlexRequests.UI/Resources/UI.de.resx @@ -198,4 +198,7 @@ hier + + Niederländisch + \ No newline at end of file diff --git a/PlexRequests.UI/Resources/UI.es.resx b/PlexRequests.UI/Resources/UI.es.resx index e7a483f69..7a37c7acc 100644 --- a/PlexRequests.UI/Resources/UI.es.resx +++ b/PlexRequests.UI/Resources/UI.es.resx @@ -198,4 +198,7 @@ aquí + + Holandés + \ No newline at end of file diff --git a/PlexRequests.UI/Resources/UI.fr.resx b/PlexRequests.UI/Resources/UI.fr.resx index 3e22411c5..0f8410740 100644 --- a/PlexRequests.UI/Resources/UI.fr.resx +++ b/PlexRequests.UI/Resources/UI.fr.resx @@ -198,4 +198,7 @@ ici + + Néerlandais + \ No newline at end of file diff --git a/PlexRequests.UI/Resources/UI.it.resx b/PlexRequests.UI/Resources/UI.it.resx index a7f77803c..a1fa4d50a 100644 --- a/PlexRequests.UI/Resources/UI.it.resx +++ b/PlexRequests.UI/Resources/UI.it.resx @@ -198,4 +198,7 @@ Here + + Olandese + \ No newline at end of file diff --git a/PlexRequests.UI/Resources/UI.nl.resx b/PlexRequests.UI/Resources/UI.nl.resx new file mode 100644 index 000000000..4c9d25ea6 --- /dev/null +++ b/PlexRequests.UI/Resources/UI.nl.resx @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Inloggen + + + Wilt u een film of tv-show te kijken, maar het is op het moment niet op Plex? Log hieronder in met uw gebruikersnaam en wachtwoord Plex.tv !! + + + Uw login gegevens worden alleen gebruikt om uw account te verifiëren Plex.! + + + Plex.tv Gebruikersnaam! + + + Gebruikersnaam + + + Wachtwoord + + + Aanmelden! + + + Er is iets fout gegaan + + + Succes + + + Plex Requests + + + Zoeken! + + + Verzoeken + + + UItgaves + + + Doneren. + + + Admin + + + Instellingen + + + Wachtwoord wijzigen + + + Uitloggen + + + Er is een nieuwe update beschikbaar is! Klik! + + + English + + + Spanish + + + German + + + Koffiebroodje + + + Portuguese + + + Zweeds + + + Italian + + + samples/testers + + + Dutch + + \ No newline at end of file diff --git a/PlexRequests.UI/Resources/UI.pt.resx b/PlexRequests.UI/Resources/UI.pt.resx index b1933c073..822d7eea6 100644 --- a/PlexRequests.UI/Resources/UI.pt.resx +++ b/PlexRequests.UI/Resources/UI.pt.resx @@ -198,4 +198,7 @@ aqui + + Holandês + \ No newline at end of file diff --git a/PlexRequests.UI/Resources/UI.resx b/PlexRequests.UI/Resources/UI.resx index 4ed1f4cce..bc954b5ea 100644 --- a/PlexRequests.UI/Resources/UI.resx +++ b/PlexRequests.UI/Resources/UI.resx @@ -179,4 +179,7 @@ Here! + + Dutch + \ No newline at end of file diff --git a/PlexRequests.UI/Resources/UI.sv.resx b/PlexRequests.UI/Resources/UI.sv.resx index 346efcd96..ae512228a 100644 --- a/PlexRequests.UI/Resources/UI.sv.resx +++ b/PlexRequests.UI/Resources/UI.sv.resx @@ -198,4 +198,7 @@ Här.” + + dutch + \ No newline at end of file diff --git a/PlexRequests.UI/Views/Shared/_Layout.cshtml b/PlexRequests.UI/Views/Shared/_Layout.cshtml index 0f1a4ad33..04604dcdf 100644 --- a/PlexRequests.UI/Views/Shared/_Layout.cshtml +++ b/PlexRequests.UI/Views/Shared/_Layout.cshtml @@ -76,6 +76,7 @@
@@ -152,9 +153,9 @@ {{status}}

-
Release Date: {{releaseDate}}
+
@UI.Requests_ReleaseDate: {{releaseDate}}
- Approved: + @UI.Common_Approved: {{#if_eq approved false}} {{/if_eq}} @@ -163,7 +164,7 @@ {{/if_eq}}
- Available + @UI.Requests_Available {{#if_eq available false}} {{/if_eq}} @@ -172,14 +173,14 @@ {{/if_eq}}
{{#if_eq type "tv"}} -
Seasons Requested: {{seriesRequested}}
+
@UI.Requests_SeasonsRequested: {{seriesRequested}}
{{/if_eq}} {{#if requestedUsers}} -
Requested By: {{requestedUsers}}
+
@UI.Requests_RequestedBy: {{requestedUsers}}
{{/if}} -
Requested Date: {{requestedDate}}
+
@UI.Requests_RequestedDate: {{requestedDate}}
- Issue: + @UI.Issues_Issue: {{#if_eq issueId 0}} {{else}} @@ -194,10 +195,10 @@ {{#if_eq hasQualities true}}
- +
{{else}} - + {{/if_eq}} {{/if_eq}}
- +
{{#if_eq available true}} - + {{else}} - + {{/if_eq}}
@@ -230,15 +231,15 @@ @@ -270,9 +271,9 @@ {{status}}

-
Release Date: {{releaseDate}}
+
@UI.Requests_ReleaseDate {{releaseDate}}
- Approved: + @UI.Common_Approved: {{#if_eq approved false}} {{/if_eq}} @@ -281,7 +282,7 @@ {{/if_eq}}
- Available + @UI.Requests_Available {{#if_eq available false}} {{/if_eq}} @@ -290,41 +291,29 @@ {{/if_eq}}
{{#if requestedUsers}} -
Requested By: {{requestedUsers}}
+
@UI.Requests_RequestedBy: {{requestedUsers}}
{{/if}} -
Requested Date: {{requestedDate}}
-
- {{#if otherMessage}} -
Message: {{otherMessage}}
- {{else}} -
Issue: {{issues}}
- {{/if}} -
-
- {{#if adminNote}} -
Note from Admin: {{adminNote}}
- {{/if}} -
+
@UI.Requests_RequestedDate: {{requestedDate}}
{{#if_eq admin true}} {{#if_eq approved false}}
- +
{{/if_eq}}
- +
{{#if_eq available true}} - + {{else}} - + {{/if_eq}}
@@ -334,15 +323,15 @@ @@ -358,7 +347,7 @@ From 419bf0270ea0f3e8e132dbb98dcabdd394aa61cb Mon Sep 17 00:00:00 2001 From: tidusjar Date: Tue, 28 Jun 2016 13:43:01 +0100 Subject: [PATCH 22/36] Fixed some small issues and improved the navbar --- PlexRequests.UI/Views/Requests/Index.cshtml | 4 ++-- PlexRequests.UI/Views/Shared/_Layout.cshtml | 26 ++++++++++++++------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/PlexRequests.UI/Views/Requests/Index.cshtml b/PlexRequests.UI/Views/Requests/Index.cshtml index df0ad42a2..d603ea105 100644 --- a/PlexRequests.UI/Views/Requests/Index.cshtml +++ b/PlexRequests.UI/Views/Requests/Index.cshtml @@ -221,7 +221,7 @@ {{#if_eq available true}} {{else}} - + {{/if_eq}} @@ -231,7 +231,7 @@

Notice

- @Model.NoticeMessage
+ @Html.Raw(Model.NoticeMessage)
@if (Model.EnabledNoticeTime) { From 36bbf3375ceb6531e2372d6b7ad9d0bc18510373 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 29 Jun 2016 13:53:01 +0100 Subject: [PATCH 36/36] Small changes --- PlexRequests.UI/Modules/AdminModule.cs | 7 ++++++- PlexRequests.UI/Modules/RequestsModule.cs | 10 +++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/PlexRequests.UI/Modules/AdminModule.cs b/PlexRequests.UI/Modules/AdminModule.cs index 8370d0907..7ad308735 100644 --- a/PlexRequests.UI/Modules/AdminModule.cs +++ b/PlexRequests.UI/Modules/AdminModule.cs @@ -719,7 +719,7 @@ namespace PlexRequests.UI.Modules private Response UpdateLogLevels(int level) { var settings = LogService.GetSettings(); - + Analytics.TrackEventAsync(Category.Admin, Action.Update, "Updated Log Levels", Username, CookieHelper.GetAnalyticClientId(Cookies), level); // apply the level var newLevel = LogLevel.FromOrdinal(level); LoggingHelper.ReconfigureLogLevel(newLevel); @@ -760,6 +760,7 @@ namespace PlexRequests.UI.Modules private Response CreateApiKey() { this.RequiresClaims(UserClaims.Admin); + Analytics.TrackEventAsync(Category.Admin, Action.Create, "Created API Key", Username, CookieHelper.GetAnalyticClientId(Cookies)); var apiKey = Guid.NewGuid().ToString("N"); var settings = PrService.GetSettings(); @@ -847,6 +848,7 @@ namespace PlexRequests.UI.Modules { var settings = this.Bind(); + Analytics.TrackEventAsync(Category.Admin, Action.Update, "Update Landing Page", Username, CookieHelper.GetAnalyticClientId(Cookies)); var plexSettings = await PlexService.GetSettingsAsync(); if (string.IsNullOrEmpty(plexSettings.Ip)) { @@ -885,6 +887,8 @@ namespace PlexRequests.UI.Modules private async Task SaveScheduledJobs() { + + Analytics.TrackEventAsync(Category.Admin, Action.Update, "Update ScheduledJobs", Username, CookieHelper.GetAnalyticClientId(Cookies)); var settings = this.Bind(); var result = await ScheduledJobSettings.SaveSettingsAsync(settings); @@ -898,6 +902,7 @@ namespace PlexRequests.UI.Modules { try { + Analytics.TrackEventAsync(Category.Admin, Action.Delete, "Clear Logs", Username, CookieHelper.GetAnalyticClientId(Cookies)); var allLogs = await LogsRepo.GetAllAsync(); foreach (var logEntity in allLogs) { diff --git a/PlexRequests.UI/Modules/RequestsModule.cs b/PlexRequests.UI/Modules/RequestsModule.cs index 13f557186..c538fa409 100644 --- a/PlexRequests.UI/Modules/RequestsModule.cs +++ b/PlexRequests.UI/Modules/RequestsModule.cs @@ -47,6 +47,9 @@ using System.Threading.Tasks; using NLog; using PlexRequests.Core.Models; +using PlexRequests.Helpers.Analytics; + +using Action = PlexRequests.Helpers.Analytics.Action; namespace PlexRequests.UI.Modules { @@ -63,7 +66,8 @@ namespace PlexRequests.UI.Modules ICouchPotatoApi cpApi, ISonarrApi sonarrApi, ISickRageApi sickRageApi, - ICacheProvider cache) : base("requests", prSettings) + ICacheProvider cache, + IAnalytics an) : base("requests", prSettings) { Service = service; PrSettings = prSettings; @@ -76,6 +80,7 @@ namespace PlexRequests.UI.Modules SickRageApi = sickRageApi; CpApi = cpApi; Cache = cache; + Analytics = an; Get["/", true] = async (x, ct) => await LoadRequests(); Get["/movies", true] = async (x, ct) => await GetMovies(); @@ -92,6 +97,7 @@ namespace PlexRequests.UI.Modules private static Logger Log = LogManager.GetCurrentClassLogger(); private IRequestService Service { get; } + private IAnalytics Analytics { get; } private INotificationService NotificationService { get; } private ISettingsService PrSettings { get; } private ISettingsService PlexSettings { get; } @@ -295,6 +301,7 @@ namespace PlexRequests.UI.Modules private async Task DeleteRequest(int requestid) { this.RequiresClaims(UserClaims.Admin); + Analytics.TrackEventAsync(Category.Requests, Action.Delete, "Delete Request", Username, CookieHelper.GetAnalyticClientId(Cookies)); var currentEntity = await Service.GetAsync(requestid); await Service.DeleteRequestAsync(currentEntity); @@ -360,6 +367,7 @@ namespace PlexRequests.UI.Modules private async Task ChangeRequestAvailability(int requestId, bool available) { this.RequiresClaims(UserClaims.Admin); + Analytics.TrackEventAsync(Category.Requests, Action.Update, available ? "Make request available" : "Make request unavailable", Username, CookieHelper.GetAnalyticClientId(Cookies)); var originalRequest = await Service.GetAsync(requestId); if (originalRequest == null) {