From 6955c59680ba51f50a84cdfc380cdfb3473c251c Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sat, 27 Mar 2021 22:46:33 +0000 Subject: [PATCH 1/6] Fixed up the reset password pages and some small tweaks --- .../app/login/resetpassword.component.html | 51 +++++++----- .../src/app/login/resetpassword.component.ts | 2 + .../login/tokenresetpassword.component.html | 82 ++++++++++++------- .../movie-advanced-options.component.html | 9 +- .../tv-advanced-options.component.html | 13 +-- src/Ombi/wwwroot/translations/en.json | 1 + 6 files changed, 100 insertions(+), 58 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/login/resetpassword.component.html b/src/Ombi/ClientApp/src/app/login/resetpassword.component.html index c1c013719..9fbeb7eda 100644 --- a/src/Ombi/ClientApp/src/app/login/resetpassword.component.html +++ b/src/Ombi/ClientApp/src/app/login/resetpassword.component.html @@ -1,21 +1,32 @@ - -
-
-
-
- -
-
-

+ +
+ +
+
+
+ +
-
-
\ No newline at end of file + + {{'PasswordReset.EmailAddressPlaceholder' | translate}} + + + {{'PasswordReset.EmailAddressPlaceholder' | translate}} is required + + + + + + + + + + +
+
diff --git a/src/Ombi/ClientApp/src/app/login/resetpassword.component.ts b/src/Ombi/ClientApp/src/app/login/resetpassword.component.ts index 7c228e962..104d77c68 100644 --- a/src/Ombi/ClientApp/src/app/login/resetpassword.component.ts +++ b/src/Ombi/ClientApp/src/app/login/resetpassword.component.ts @@ -2,12 +2,14 @@ import { Component, OnInit, Inject } from "@angular/core"; import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { DomSanitizer } from "@angular/platform-browser"; +import { fadeInOutAnimation } from "../animations/fadeinout"; import { ICustomizationSettings } from "../interfaces"; import { IdentityService, ImageService, NotificationService, SettingsService } from "../services"; @Component({ templateUrl: "./resetpassword.component.html", + animations: [fadeInOutAnimation], styleUrls: ["./login.component.scss"], }) export class ResetPasswordComponent implements OnInit { diff --git a/src/Ombi/ClientApp/src/app/login/tokenresetpassword.component.html b/src/Ombi/ClientApp/src/app/login/tokenresetpassword.component.html index fdedfb900..6a1c2567f 100644 --- a/src/Ombi/ClientApp/src/app/login/tokenresetpassword.component.html +++ b/src/Ombi/ClientApp/src/app/login/tokenresetpassword.component.html @@ -1,30 +1,56 @@ -
-
-
-
- -
-
-

- - -
The passwords do not match
-
- -
The Password is required
-
The Email is required
-
The Confirm Password is required
-
- - + +
+ +
+
+
+ + +
-
- -
\ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/media-details/components/movie/panels/movie-advanced-options/movie-advanced-options.component.html b/src/Ombi/ClientApp/src/app/media-details/components/movie/panels/movie-advanced-options/movie-advanced-options.component.html index b7d3d6b40..dc21e18c4 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/movie/panels/movie-advanced-options/movie-advanced-options.component.html +++ b/src/Ombi/ClientApp/src/app/media-details/components/movie/panels/movie-advanced-options/movie-advanced-options.component.html @@ -1,6 +1,5 @@ -

- - Advanced Options

+

{{'MediaDetails.AdvancedOptions' | translate }}

+
{{'MediaDetails.QualityProfilesSelect' | translate }} @@ -18,6 +17,6 @@
- - + +
\ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-advanced-options/tv-advanced-options.component.html b/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-advanced-options/tv-advanced-options.component.html index 14e6629f1..13c39a111 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-advanced-options/tv-advanced-options.component.html +++ b/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-advanced-options/tv-advanced-options.component.html @@ -1,7 +1,10 @@ -

- - Advanced Options

+

{{'MediaDetails.AdvancedOptions' | translate }}

+
+ {{'MediaDetails.QualityProfilesSelect' | translate }} @@ -18,6 +21,6 @@
- - + +
\ No newline at end of file diff --git a/src/Ombi/wwwroot/translations/en.json b/src/Ombi/wwwroot/translations/en.json index 28565d0f7..cf865fce7 100644 --- a/src/Ombi/wwwroot/translations/en.json +++ b/src/Ombi/wwwroot/translations/en.json @@ -254,6 +254,7 @@ "AdvancedOptions":"Advanced Options", "AutoApproveOptions":"You can configure the request here, once requested it will be send to your DVR application and will be auto approved!", "AutoApproveOptionsTv":"You can configure the request here, once requested it will be send to your DVR application and will be auto approved! If the request is already in Sonarr, we will not change the root folder or quality profile if you set it!", + "AutoApproveOptionsTvShort":"You can configure the request here, once requested it will be send to your DVR application! If the request is already in Sonarr, we will not change the root folder or quality profile if you set it!", "QualityProfilesSelect":"Select A Quality Profile", "RootFolderSelect":"Select A Root Folder", "Status":"Status", From 3c5e7ba37f7c8e38d0a621868dce1ceb8d285ed3 Mon Sep 17 00:00:00 2001 From: Emil Kitti Date: Sun, 28 Mar 2021 04:42:54 +0200 Subject: [PATCH 2/6] Verify Sonarr quality override Ombi implicitly trusts that the quality override is set correctly, and causes issues downstream. Line 258 in [TvSender.cs](https://github.com/Ombi-app/Ombi/tree/develop/src/Ombi.Core/Senders/TvSender.cs#L258) it tries to add a series but the, `AddSeries` function in [SonarrApi.cs](https://github.com/Ombi-app/Ombi/blob/develop/src/Ombi.Api.Sonarr/SonarrApi.cs#L92) fails to validate the `NewSeries` object since the `qualityProfileId` attribute is set to `0`. In the end it assumes the series is added in Sonarr and causes a API request with series id set to `0` which causes the following error. ``` [Error] StatusCode: BadRequest, Reason: Bad Request, RequestUri: http://SONARR_HOST/sonarr/api/series/0 ``` --- src/Ombi.Core/Senders/TvSender.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Ombi.Core/Senders/TvSender.cs b/src/Ombi.Core/Senders/TvSender.cs index 9cb98a40b..b812cbb51 100644 --- a/src/Ombi.Core/Senders/TvSender.cs +++ b/src/Ombi.Core/Senders/TvSender.cs @@ -206,7 +206,11 @@ namespace Ombi.Core.Senders // Overrides on the request take priority if (model.ParentRequest.QualityOverride.HasValue) { - qualityToUse = model.ParentRequest.QualityOverride.Value; + overrideQuality = model.ParentRequest.QualityOverride.Value; + if (overrideQuality > 0) + { + qualityToUse = overrideQuality; + } } if (model.ParentRequest.RootFolder.HasValue) { @@ -547,4 +551,4 @@ namespace Ombi.Core.Senders return string.Empty; } } -} \ No newline at end of file +} From 87d8ba04996d83de9ebd6fd13da21f970eac5718 Mon Sep 17 00:00:00 2001 From: Emil Kitti Date: Sun, 28 Mar 2021 05:24:26 +0200 Subject: [PATCH 3/6] Fix --- src/Ombi.Core/Senders/TvSender.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ombi.Core/Senders/TvSender.cs b/src/Ombi.Core/Senders/TvSender.cs index b812cbb51..c94935a31 100644 --- a/src/Ombi.Core/Senders/TvSender.cs +++ b/src/Ombi.Core/Senders/TvSender.cs @@ -206,7 +206,7 @@ namespace Ombi.Core.Senders // Overrides on the request take priority if (model.ParentRequest.QualityOverride.HasValue) { - overrideQuality = model.ParentRequest.QualityOverride.Value; + var overrideQuality = model.ParentRequest.QualityOverride.Value; if (overrideQuality > 0) { qualityToUse = overrideQuality; From 45bcfca138c649875f471abaae63b3d828d78d10 Mon Sep 17 00:00:00 2001 From: Emil Kitti Date: Sun, 28 Mar 2021 05:53:22 +0200 Subject: [PATCH 4/6] Fix rootfolder override rootfolder override has the same issue --- src/Ombi.Core/Senders/TvSender.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Ombi.Core/Senders/TvSender.cs b/src/Ombi.Core/Senders/TvSender.cs index c94935a31..9fc971ab5 100644 --- a/src/Ombi.Core/Senders/TvSender.cs +++ b/src/Ombi.Core/Senders/TvSender.cs @@ -206,15 +206,19 @@ namespace Ombi.Core.Senders // Overrides on the request take priority if (model.ParentRequest.QualityOverride.HasValue) { - var overrideQuality = model.ParentRequest.QualityOverride.Value; - if (overrideQuality > 0) + var qualityOverride = model.ParentRequest.QualityOverride.Value; + if (qualityOverride > 0) { - qualityToUse = overrideQuality; + qualityToUse = qualityOverride; } } if (model.ParentRequest.RootFolder.HasValue) { - rootFolderPath = await GetSonarrRootPath(model.ParentRequest.RootFolder.Value, s); + var rootfolderOverride = model.ParentRequest.RootFolder.Value; + if (rootfolderOverride > 0) + { + rootFolderPath = await GetSonarrRootPath(rootfolderOverride, s); + } } // Are we using v3 sonarr? From 2dc364e96aeefe52d8a85d50e5f2b7927f810757 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Sun, 28 Mar 2021 14:13:17 +0100 Subject: [PATCH 5/6] Fixed the Discord TV notification not working after moving away from TV maze #4120 --- .../NotificationMessageCurlys.cs | 26 ++++++------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/Ombi.Notifications/NotificationMessageCurlys.cs b/src/Ombi.Notifications/NotificationMessageCurlys.cs index 54e85080b..3b6263fb6 100644 --- a/src/Ombi.Notifications/NotificationMessageCurlys.cs +++ b/src/Ombi.Notifications/NotificationMessageCurlys.cs @@ -58,15 +58,10 @@ namespace Ombi.Notifications Year = req?.ReleaseDate.Year.ToString(); DenyReason = req?.DeniedReason; AvailableDate = req?.MarkedAsAvailable?.ToString("D") ?? string.Empty; - if (req?.RequestType == RequestType.Movie) - { - PosterImage = string.Format((req?.PosterPath ?? string.Empty).StartsWith("/", StringComparison.InvariantCultureIgnoreCase) - ? "https://image.tmdb.org/t/p/w300{0}" : "https://image.tmdb.org/t/p/w300/{0}", req?.PosterPath); - } - else - { - PosterImage = req?.PosterPath; - } + + PosterImage = string.Format((req?.PosterPath ?? string.Empty).StartsWith("/", StringComparison.InvariantCultureIgnoreCase) + ? "https://image.tmdb.org/t/p/w300{0}" : "https://image.tmdb.org/t/p/w300/{0}", req?.PosterPath); + AdditionalInformation = opts?.AdditionalInformation ?? string.Empty; @@ -168,15 +163,10 @@ namespace Ombi.Notifications Overview = req?.ParentRequest.Overview; Year = req?.ParentRequest.ReleaseDate.Year.ToString(); - if (req?.RequestType == RequestType.Movie) - { - PosterImage = string.Format((req?.ParentRequest.PosterPath ?? string.Empty).StartsWith("/", StringComparison.InvariantCultureIgnoreCase) - ? "https://image.tmdb.org/t/p/w300{0}" : "https://image.tmdb.org/t/p/w300/{0}", req?.ParentRequest.PosterPath); - } - else - { - PosterImage = req?.ParentRequest.PosterPath; - } + + PosterImage = string.Format((req?.ParentRequest.PosterPath ?? string.Empty).StartsWith("/", StringComparison.InvariantCultureIgnoreCase) + ? "https://image.tmdb.org/t/p/w300{0}" : "https://image.tmdb.org/t/p/w300/{0}", req?.ParentRequest.PosterPath); + AdditionalInformation = opts.AdditionalInformation; // DO Episode and Season Lists From f2525650f1c8cbca82a7bed4545ff1272e04995a Mon Sep 17 00:00:00 2001 From: Emil Kitti Date: Sun, 28 Mar 2021 18:50:10 +0200 Subject: [PATCH 6/6] fixes rootfolder selection in sonarr --- src/Ombi.Core/Senders/TvSender.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ombi.Core/Senders/TvSender.cs b/src/Ombi.Core/Senders/TvSender.cs index 9fc971ab5..8187cad59 100644 --- a/src/Ombi.Core/Senders/TvSender.cs +++ b/src/Ombi.Core/Senders/TvSender.cs @@ -167,7 +167,7 @@ namespace Ombi.Core.Senders { // Get the root path from the rootfolder selected. // For some reason, if we haven't got one use the first root folder in Sonarr - rootFolderPath = await GetSonarrRootPath(model.ParentRequest.RootFolder ?? int.Parse(s.RootPathAnime), s); + rootFolderPath = await GetSonarrRootPath(int.Parse(s.RootPathAnime), s); int.TryParse(s.QualityProfileAnime, out qualityToUse); if (profiles != null) { @@ -188,7 +188,7 @@ namespace Ombi.Core.Senders int.TryParse(s.QualityProfile, out qualityToUse); // Get the root path from the rootfolder selected. // For some reason, if we haven't got one use the first root folder in Sonarr - rootFolderPath = await GetSonarrRootPath(model.ParentRequest.RootFolder ?? int.Parse(s.RootPath), s); + rootFolderPath = await GetSonarrRootPath(int.Parse(s.RootPath), s); if (profiles != null) { if (profiles.SonarrRootPath > 0)