From f2ba56f13167a3d31d9cc7d8da9c568c3d443770 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Tue, 5 Apr 2016 08:49:11 +0100 Subject: [PATCH] Small changes for #32 --- PlexRequests.UI/Content/requests.js | 4 +--- PlexRequests.UI/Models/RequestViewModel.cs | 1 + PlexRequests.UI/Modules/RequestsModule.cs | 4 +++- PlexRequests.UI/Views/Admin/Sonarr.cshtml | 3 +++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/PlexRequests.UI/Content/requests.js b/PlexRequests.UI/Content/requests.js index 83a351822..b1efdbeca 100644 --- a/PlexRequests.UI/Content/requests.js +++ b/PlexRequests.UI/Content/requests.js @@ -523,9 +523,7 @@ function buildRequestContext(result, type) { coverArtUrl: result.coverArtUrl, qualities: result.qualities, hasQualities: result.qualities && result.qualities.length > 0, - coverArtUrl: result.coverArtUrl, - qualities: result.qualities, - hasQualities: result.qualities && result.qualities.length > 0 + artist: result.artistName }; return context; diff --git a/PlexRequests.UI/Models/RequestViewModel.cs b/PlexRequests.UI/Models/RequestViewModel.cs index 12f01f45b..1ab3b62b9 100644 --- a/PlexRequests.UI/Models/RequestViewModel.cs +++ b/PlexRequests.UI/Models/RequestViewModel.cs @@ -53,5 +53,6 @@ namespace PlexRequests.UI.Models public string TvSeriesRequestType { get; set; } public string MusicBrainzId { get; set; } public QualityModel[] Qualities { get; set; } + public string ArtistName { get; set; } } } diff --git a/PlexRequests.UI/Modules/RequestsModule.cs b/PlexRequests.UI/Modules/RequestsModule.cs index 2cee0a914..5569aed07 100644 --- a/PlexRequests.UI/Modules/RequestsModule.cs +++ b/PlexRequests.UI/Modules/RequestsModule.cs @@ -300,7 +300,9 @@ namespace PlexRequests.UI.Modules OtherMessage = album.OtherMessage, AdminNotes = album.AdminNote, TvSeriesRequestType = album.SeasonsRequested, - MusicBrainzId = album.MusicBrainzId + MusicBrainzId = album.MusicBrainzId, + ArtistName = album.ArtistName + }; }).ToList(); diff --git a/PlexRequests.UI/Views/Admin/Sonarr.cshtml b/PlexRequests.UI/Views/Admin/Sonarr.cshtml index 72f0637b2..cad235f58 100644 --- a/PlexRequests.UI/Views/Admin/Sonarr.cshtml +++ b/PlexRequests.UI/Views/Admin/Sonarr.cshtml @@ -131,6 +131,9 @@ { var qualitySelected = @Model.QualityProfile; + if (!qualitySelected) { + return; + } var $form = $("#mainForm"); $.ajax({ type: $form.prop("method"),