diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 961871f8a..d8a4cf87f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -28,6 +28,8 @@ jobs: unit-test: runs-on: ubuntu-latest + permissions: + checks: write steps: - uses: actions/checkout@v2 - uses: actions/setup-dotnet@v1 @@ -45,7 +47,16 @@ jobs: - name: Run Unit Tests run: | cd src - dotnet test --logger trx --results-directory "TestResults" + dotnet test --logger "trx;LogFileName=test-results.trx" || true + + - name: Test Report + uses: dorny/test-reporter@v1 + if: always() + with: + name: DotNET Tests + path: "**/test-results.trx" + reporter: dotnet-trx + fail-on-error: true analysis: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ca246ad9..2e14fa33f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +## [4.16.17](https://github.com/Ombi-app/Ombi/compare/v4.16.16...v4.16.17) (2022-04-25) + + + +## [4.16.16](https://github.com/Ombi-app/Ombi/compare/v4.16.15...v4.16.16) (2022-04-25) + + +### Bug Fixes + +* **4616:** :bug: fixed mandatory fields ([d8f2260](https://github.com/Ombi-app/Ombi/commit/d8f2260c7ae3ed48386743b7adbd06e284487034)) + + + +## [4.16.15](https://github.com/Ombi-app/Ombi/compare/v4.16.14...v4.16.15) (2022-04-24) + + + ## [4.16.14](https://github.com/Ombi-app/Ombi/compare/v4.16.13...v4.16.14) (2022-04-19) @@ -321,30 +338,3 @@ -# [4.12.0](https://github.com/Ombi-app/Ombi/compare/v4.11.8...v4.12.0) (2022-02-14) - - -### Features - -* **radarr:** 4K Requests and Radarr 4K support ([ba88848](https://github.com/Ombi-app/Ombi/commit/ba88848866b0a9dedb1e79b55c4d81a0fd453843)) - - - -## [4.11.8](https://github.com/Ombi-app/Ombi/compare/v4.11.7...v4.11.8) (2022-02-13) - - -### Bug Fixes - -* **settings:** :bug: Fixed an issue where we were not displaying the excluded keyworks correctly in the TheMovieDbSettings page ([d3b3316](https://github.com/Ombi-app/Ombi/commit/d3b3316cbac18356b2f6b0912a3deb2c183e6534)) - - - -## [4.11.7](https://github.com/Ombi-app/Ombi/compare/v4.11.6...v4.11.7) (2022-02-12) - - -### Bug Fixes - -* **notifications:** :bug: This is a fix for some of the duplicate notification issues [#3825](https://github.com/Ombi-app/Ombi/issues/3825) ([22bb422](https://github.com/Ombi-app/Ombi/commit/22bb4226ead2d62e8c2c2c05be47d7da621402e2)) - - - diff --git a/README.md b/README.md index 32552817e..a8360d6c8 100644 --- a/README.md +++ b/README.md @@ -665,14 +665,21 @@ Here are some of the features Ombi has: Shoghi + + + Teifun2 +
+ Teifun2 +
+ + thomasvt1
Thomas Van Tilburg
- - + Tim-Trott @@ -707,15 +714,15 @@ Here are some of the features Ombi has:
Xirg
- + + bazhip
Tim OBrien
- - + x-limitless-x @@ -750,15 +757,15 @@ Here are some of the features Ombi has:
M4tta
- + + maartenheebink
Maartenheebink
- - + masterhuck diff --git a/src/Ombi.Core/Engine/MovieRequestEngine.cs b/src/Ombi.Core/Engine/MovieRequestEngine.cs index cb4cb4ba6..9403fdcae 100644 --- a/src/Ombi.Core/Engine/MovieRequestEngine.cs +++ b/src/Ombi.Core/Engine/MovieRequestEngine.cs @@ -533,7 +533,10 @@ namespace Ombi.Core.Engine } else { - x.ShowSubscribe = true; + if (!x.Available && !x.Available4K && (!x.Denied ?? true) && (!x.Denied4K ?? true)) + { + x.ShowSubscribe = true; + } var hasSub = sub.FirstOrDefault(r => r.RequestId == x.Id); x.Subscribed = hasSub != null; } diff --git a/src/Ombi.Core/Engine/MusicRequestEngine.cs b/src/Ombi.Core/Engine/MusicRequestEngine.cs index 640d2ade3..67caa81a2 100644 --- a/src/Ombi.Core/Engine/MusicRequestEngine.cs +++ b/src/Ombi.Core/Engine/MusicRequestEngine.cs @@ -270,7 +270,10 @@ namespace Ombi.Core.Engine } else { - x.ShowSubscribe = true; + if (!x.Available && (!x.Denied ?? false)) + { + x.ShowSubscribe = true; + } var hasSub = sub.FirstOrDefault(r => r.RequestId == x.Id); x.Subscribed = hasSub != null; } diff --git a/src/Ombi.Core/Engine/TvRequestEngine.cs b/src/Ombi.Core/Engine/TvRequestEngine.cs index 5664d276f..8ccc6d17e 100644 --- a/src/Ombi.Core/Engine/TvRequestEngine.cs +++ b/src/Ombi.Core/Engine/TvRequestEngine.cs @@ -886,7 +886,10 @@ namespace Ombi.Core.Engine } else { - x.ShowSubscribe = true; + if (!x.Available && (!x.Denied ?? true)) + { + x.ShowSubscribe = true; + } var result = relevantSubs.FirstOrDefault(s => s.RequestId == x.Id); x.Subscribed = result != null; } diff --git a/src/Ombi.Core/Senders/MusicSender.cs b/src/Ombi.Core/Senders/MusicSender.cs index 6390578dd..260b008fe 100644 --- a/src/Ombi.Core/Senders/MusicSender.cs +++ b/src/Ombi.Core/Senders/MusicSender.cs @@ -70,7 +70,7 @@ namespace Ombi.Core.Senders } - return new SenderResult { Success = false, Sent = false, Message = "Something went wrong!" }; + return new SenderResult { Success = false, Sent = false }; } private async Task SendToLidarr(AlbumRequest model, LidarrSettings settings) diff --git a/src/Ombi.Core/Senders/TvSender.cs b/src/Ombi.Core/Senders/TvSender.cs index 3676d05ee..22f6aadcd 100644 --- a/src/Ombi.Core/Senders/TvSender.cs +++ b/src/Ombi.Core/Senders/TvSender.cs @@ -133,8 +133,7 @@ namespace Ombi.Core.Senders return new SenderResult { - Success = false, - Message = "Something went wrong!" + Success = false }; } @@ -343,8 +342,6 @@ namespace Ombi.Core.Senders await Task.Delay(500); } - var seriesChanges = false; - foreach (var season in model.SeasonRequests) { foreach (var ep in season.Episodes) @@ -359,72 +356,36 @@ namespace Ombi.Core.Senders } existingSeason = result.seasons.FirstOrDefault(x => x.seasonNumber == season.SeasonNumber); - var sonarrEpisodeList = sonarrEpList.Where(x => x.seasonNumber == season.SeasonNumber).ToList(); - var sonarrEpCount = sonarrEpisodeList.Count; - var ourRequestCount = season.Episodes.Count; - - var ourEpisodes = season.Episodes.Select(x => x.EpisodeNumber).ToList(); - var unairedEpisodes = sonarrEpisodeList.Where(x => x.airDateUtc > DateTime.UtcNow).Select(x => x.episodeNumber).ToList(); - //// Check if we have requested all the latest episodes, if we have then monitor - //// NOTE, not sure if needed since ombi ui displays future episodes anyway... - //ourEpisodes.AddRange(unairedEpisodes); - //var distinctEpisodes = ourEpisodes.Distinct().ToList(); - //var missingEpisodes = Enumerable.Range(distinctEpisodes.Min(), distinctEpisodes.Count).Except(distinctEpisodes); - - if (sonarrEpCount == ourRequestCount /*|| !missingEpisodes.Any()*/) + // Make sure this season is set to monitored + if (!existingSeason.monitored) { - // We have the same amount of requests as all of the episodes in the season. + // We need to monitor it, problem being is all episodes will now be monitored + // So we need to monitor the series but unmonitor every episode existingSeason.monitored = true; - seriesChanges = true; + var sea = result.seasons.FirstOrDefault(x => x.seasonNumber == existingSeason.seasonNumber); + sea.monitored = true; - // We do not need to update the episodes as marking the season as monitored will mark the episodes as monitored. - var seasonToUpdate = result.seasons.FirstOrDefault(x => x.seasonNumber == season.SeasonNumber); - seasonToUpdate.monitored = true; // Update by ref - } - else - { - // Make sure this season is set to monitored - if (!existingSeason.monitored) + result = await SonarrApi.UpdateSeries(result, s.ApiKey, s.FullUri); + var epToUnmonitored = new List(); + var newEpList = sonarrEpList.ConvertAll(ep => new Episode(ep)); // Clone it so we don't modify the original member + foreach (var ep in newEpList.Where(x => x.seasonNumber == existingSeason.seasonNumber).ToList()) { - // We need to monitor it, problem being is all episodes will now be monitored - // So we need to monitor the series but unmonitor every episode - // Except the episodes that are already monitored before we update the series (we do not want to unmonitored episodes that are monitored beforehand) - existingSeason.monitored = true; - var sea = result.seasons.FirstOrDefault(x => x.seasonNumber == existingSeason.seasonNumber); - sea.monitored = true; - //var previouslyMonitoredEpisodes = sonarrEpList.Where(x => - // x.seasonNumber == existingSeason.seasonNumber && x.monitored).Select(x => x.episodeNumber).ToList(); // We probably don't actually care about this - result = await SonarrApi.UpdateSeries(result, s.ApiKey, s.FullUri); - var epToUnmonitored = new List(); - var newEpList = sonarrEpList.ConvertAll(ep => new Episode(ep)); // Clone it so we don't modify the original member - foreach (var ep in newEpList.Where(x => x.seasonNumber == existingSeason.seasonNumber).ToList()) - { - //if (previouslyMonitoredEpisodes.Contains(ep.episodeNumber)) - //{ - // // This was previously monitored. - // continue; - //} - ep.monitored = false; - epToUnmonitored.Add(ep); - } - - foreach (var epToUpdate in epToUnmonitored) - { - await SonarrApi.UpdateEpisode(epToUpdate, s.ApiKey, s.FullUri); - } + ep.monitored = false; + epToUnmonitored.Add(ep); } - // Now update the episodes that need updating - foreach (var epToUpdate in episodesToUpdate.Where(x => x.seasonNumber == season.SeasonNumber)) + + foreach (var epToUpdate in epToUnmonitored) { await SonarrApi.UpdateEpisode(epToUpdate, s.ApiKey, s.FullUri); } } - } - if (seriesChanges) - { - await SonarrApi.SeasonPass(s.ApiKey, s.FullUri, result); + // Now update the episodes that need updating + foreach (var epToUpdate in episodesToUpdate.Where(x => x.seasonNumber == season.SeasonNumber)) + { + await SonarrApi.UpdateEpisode(epToUpdate, s.ApiKey, s.FullUri); + } } if (!s.AddOnly) diff --git a/src/Ombi.Store/Context/OmbiContext.cs b/src/Ombi.Store/Context/OmbiContext.cs index 0681d9ca0..77298e719 100644 --- a/src/Ombi.Store/Context/OmbiContext.cs +++ b/src/Ombi.Store/Context/OmbiContext.cs @@ -212,7 +212,7 @@ namespace Ombi.Store.Context notificationToAdd = new NotificationTemplates { NotificationType = notificationType, - Message = "Your TV request is now partially available! Season {PartiallyAvailableSeasonNumber} Episodes {PartiallyAvailableEpisodeNumbers}!", + Message = "Your TV request for {Title} is now partially available! Season {PartiallyAvailableSeasonNumber} Episodes {PartiallyAvailableEpisodeNumbers}!", Subject = "{ApplicationName}: Partially Available Request!", Agent = agent, Enabled = true, diff --git a/src/Ombi/ClientApp/src/app/issues/issuestable.component.html b/src/Ombi/ClientApp/src/app/issues/issuestable.component.html index 8e22d3e51..99b297b60 100644 --- a/src/Ombi/ClientApp/src/app/issues/issuestable.component.html +++ b/src/Ombi/ClientApp/src/app/issues/issuestable.component.html @@ -14,7 +14,7 @@ - + {{ 'Issues.Details' | translate}} diff --git a/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-request-grid/tv-request-grid.component.ts b/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-request-grid/tv-request-grid.component.ts index 7d1304eff..bac88756e 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-request-grid/tv-request-grid.component.ts +++ b/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-request-grid/tv-request-grid.component.ts @@ -36,7 +36,7 @@ export class TvRequestGridComponent { // Make sure something has been selected const selected = this.selection.hasValue(); if (!selected && !this.tv.requestAll && !this.tv.firstSeason && !this.tv.latestSeason) { - this.notificationService.send("You need to select some episodes!", "OK"); + this.notificationService.send(this.translate.instant("Requests.NeedToSelectEpisodes")); return; } @@ -80,70 +80,6 @@ export class TvRequestGridComponent { } } - public async approve(request: IChildRequests) { - const result = await this.requestService.approveChild({ - id: request.id - }).toPromise(); - - if (result.result) { - request.approved = true; - request.denied = false; - request.seasonRequests.forEach((season) => { - season.episodes.forEach((ep) => { - ep.approved = true; - }); - }); - this.notificationService.send("Request has been approved", "Ok"); - } else { - this.notificationService.send(result.errorMessage, "Ok"); - } - } - - public changeAvailability(request: IChildRequests, available: boolean) { - request.available = available; - request.seasonRequests.forEach((season) => { - season.episodes.forEach((ep) => { - ep.available = available; - }); - }); - if (available) { - this.requestService.markTvAvailable({ id: request.id }).subscribe(x => { - if (x.result) { - this.notificationService.send( - `This request is now available`); - } else { - this.notificationService.send("Request Available", x.message ? x.message : x.errorMessage); - request.approved = false; - } - }); - } else { - this.requestService.markTvUnavailable({ id: request.id }).subscribe(x => { - if (x.result) { - this.notificationService.send( - `This request is now unavailable`); - } else { - this.notificationService.send("Request Available", x.message ? x.message : x.errorMessage); - request.approved = false; - } - }); - } - } - public async deny(request: IChildRequests) { - const dialogRef = this.dialog.open(DenyDialogComponent, { - width: '250px', - data: {requestId: request.id, requestType: RequestType.tvShow} - }); - - dialogRef.afterClosed().subscribe(result => { - request.denied = true; - request.seasonRequests.forEach((season) => { - season.episodes.forEach((ep) => { - ep.approved = false; - }); - }); - }); - } - public async requestAllSeasons() { this.tv.requestAll = true; await this.submitRequests(); diff --git a/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-requests/tv-requests-panel.component.ts b/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-requests/tv-requests-panel.component.ts index e397e60ea..1aa795850 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-requests/tv-requests-panel.component.ts +++ b/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-requests/tv-requests-panel.component.ts @@ -6,6 +6,7 @@ import { MatDialog } from "@angular/material/dialog"; import { MessageService } from "../../../../../services"; import { RequestService } from "../../../../../services/request.service"; import { RequestServiceV2 } from "../../../../../services/requestV2.service"; +import { TranslateService } from "@ngx-translate/core"; @Component({ templateUrl: "./tv-requests-panel.component.html", @@ -24,7 +25,8 @@ export class TvRequestsPanelComponent { constructor(private requestService: RequestService, private requestService2: RequestServiceV2, private messageService: MessageService, - public dialog: MatDialog) { + public dialog: MatDialog, + private translateService: TranslateService) { } @@ -41,7 +43,7 @@ export class TvRequestsPanelComponent { ep.approved = true; }); }); - this.messageService.send("Request has been approved", "Ok"); + this.messageService.send(this.translateService.instant("Requests.SuccessfullyApproved")); } else { this.messageService.sendRequestEngineResultError(result); } @@ -52,7 +54,7 @@ export class TvRequestsPanelComponent { if (result) { this.tvRequest.splice(this.tvRequest.indexOf(request),1); - this.messageService.send("Request has been Deleted", "Ok"); + this.messageService.send(this.translateService.instant("Requests.SuccessfullyDeleted")); } } @@ -67,9 +69,9 @@ export class TvRequestsPanelComponent { this.requestService.markTvAvailable({ id: request.id }).subscribe(x => { if (x.result) { this.messageService.send( - `This request is now available`); + this.translateService.instant("Requests.NowAvailable")); } else { - this.messageService.send("Request Available", x.message ? x.message : x.errorMessage); + this.messageService.sendRequestEngineResultError(x); request.approved = false; } }); @@ -77,9 +79,9 @@ export class TvRequestsPanelComponent { this.requestService.markTvUnavailable({ id: request.id }).subscribe(x => { if (x.result) { this.messageService.send( - `This request is now unavailable`); + this.translateService.instant("Requests.NowUnavailable")); } else { - this.messageService.send("Request Available", x.message ? x.message : x.errorMessage); + this.messageService.sendRequestEngineResultError(x); request.approved = false; } }); @@ -102,11 +104,11 @@ export class TvRequestsPanelComponent { } public reProcessRequest(request: IChildRequests) { - this.requestService2.reprocessRequest(request.id, RequestType.tvShow, false).subscribe(result => { - if (result.result) { - this.messageService.send(result.message ? result.message : "Successfully Re-processed the request", "Ok"); + this.requestService2.reprocessRequest(request.id, RequestType.tvShow, false).subscribe(x => { + if (x.result) { + this.messageService.send(this.translateService.instant("Requests.SuccessfullyReprocessed")); } else { - this.messageService.sendRequestEngineResultError(result); + this.messageService.sendRequestEngineResultError(x); } }); } diff --git a/src/Ombi/ClientApp/src/app/requests-list/components/albums-grid/albums-grid.component.html b/src/Ombi/ClientApp/src/app/requests-list/components/albums-grid/albums-grid.component.html index 977b55a17..7e06a7336 100644 --- a/src/Ombi/ClientApp/src/app/requests-list/components/albums-grid/albums-grid.component.html +++ b/src/Ombi/ClientApp/src/app/requests-list/components/albums-grid/albums-grid.component.html @@ -59,7 +59,7 @@ - + {{ 'Requests.Details' | translate}} diff --git a/src/Ombi/ClientApp/src/app/requests-list/components/movies-grid/movies-grid.component.html b/src/Ombi/ClientApp/src/app/requests-list/components/movies-grid/movies-grid.component.html index d95460b40..26da47524 100644 --- a/src/Ombi/ClientApp/src/app/requests-list/components/movies-grid/movies-grid.component.html +++ b/src/Ombi/ClientApp/src/app/requests-list/components/movies-grid/movies-grid.component.html @@ -83,8 +83,8 @@ - - + {{ 'Requests.Details' | translate}} + {{ 'Requests.Options' | translate}} @@ -103,4 +103,4 @@ - \ No newline at end of file + diff --git a/src/Ombi/ClientApp/src/app/requests-list/components/tv-grid/tv-grid.component.html b/src/Ombi/ClientApp/src/app/requests-list/components/tv-grid/tv-grid.component.html index 8cb00d3bb..7eb4b5634 100644 --- a/src/Ombi/ClientApp/src/app/requests-list/components/tv-grid/tv-grid.component.html +++ b/src/Ombi/ClientApp/src/app/requests-list/components/tv-grid/tv-grid.component.html @@ -63,7 +63,7 @@ - + {{'Requests.Details' | translate}} diff --git a/src/Ombi/ClientApp/src/app/services/message.service.ts b/src/Ombi/ClientApp/src/app/services/message.service.ts index be1df37be..995bc0f89 100644 --- a/src/Ombi/ClientApp/src/app/services/message.service.ts +++ b/src/Ombi/ClientApp/src/app/services/message.service.ts @@ -22,11 +22,15 @@ export class MessageService { } public sendRequestEngineResultError(result: IRequestEngineResult, action: string = "Ok") { const textKey = 'Requests.ErrorCodes.' + result.errorCode; - const text = this.translate.instant(textKey); - if (text !== textKey) { - this.send(text, action); - } else { - this.send(result.errorMessage ? result.errorMessage : result.message, action); + var text = this.translate.instant(textKey); + if (text === textKey) { // Error code on backend may not exist in frontend + if (result.errorMessage || result.message) { + text = result.errorMessage ? result.errorMessage : result.message; + } else { + text = this.translate.instant('ErrorPages.SomethingWentWrong'); + } } + + this.send(text, action); } } diff --git a/src/Ombi/ClientApp/src/app/settings/radarr/components/radarr-form.component.ts b/src/Ombi/ClientApp/src/app/settings/radarr/components/radarr-form.component.ts index e85bfc08b..7b331e5eb 100644 --- a/src/Ombi/ClientApp/src/app/settings/radarr/components/radarr-form.component.ts +++ b/src/Ombi/ClientApp/src/app/settings/radarr/components/radarr-form.component.ts @@ -9,7 +9,7 @@ import { TesterService, NotificationService, RadarrService } from "../../../serv selector: "ombi-settings-radarr-form", templateUrl: "./radarr-form.component.html", styleUrls: ["./radarr-form.component.scss"], - // changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush }) export class RadarrFormComponent implements OnInit { @@ -23,11 +23,11 @@ export class RadarrFormComponent implements OnInit { constructor(private radarrService: RadarrService, private notificationService: NotificationService, private testerService: TesterService, - private controlContainer: ControlContainer) { } + private controlContainer: ControlContainer) { + } public ngOnInit() { this.form = this.controlContainer.control; - // this.toggleValidators(); this.qualities = []; this.qualities.push({ name: "Please Select", id: -1 }); diff --git a/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.html b/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.html index 724beccf1..5a3e24e90 100644 --- a/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.html +++ b/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.html @@ -8,11 +8,13 @@ diff --git a/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts b/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts index 1e2925f13..87f83efcc 100644 --- a/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts +++ b/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts @@ -1,9 +1,10 @@ -import { Component, OnInit } from "@angular/core"; +import { Component, OnInit, QueryList, ViewChild, ViewChildren } from "@angular/core"; import { FormBuilder, FormGroup } from "@angular/forms"; import { IMinimumAvailability, IRadarrCombined, IRadarrProfile, IRadarrRootFolder } from "../../interfaces"; import { NotificationService, SettingsService } from "../../services"; import { FeaturesFacade } from "../../state/features/features.facade"; +import { RadarrFormComponent } from "./components/radarr-form.component"; @Component({ templateUrl: "./radarr.component.html", @@ -19,11 +20,15 @@ export class RadarrComponent implements OnInit { public form: FormGroup; public is4kEnabled: boolean = false; + @ViewChildren('4kForm') public form4k: QueryList; + @ViewChildren('normalForm') public normalForm: QueryList; + constructor(private settingsService: SettingsService, private notificationService: NotificationService, private featureFacade: FeaturesFacade, private fb: FormBuilder) { } + public ngOnInit() { this.is4kEnabled = this.featureFacade.is4kEnabled(); this.settingsService.getRadarr() @@ -56,7 +61,16 @@ export class RadarrComponent implements OnInit { scanForAvailability: [x.radarr4K.scanForAvailability] }), }); + this.normalForm.changes.forEach((comp => { + comp.first.toggleValidators(); + })) + if (this.is4kEnabled) { + this.form4k.changes.forEach((comp => { + comp.first.toggleValidators(); + })) + } }); + } diff --git a/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.component.html b/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.component.html index f79188ae9..0d5171741 100644 --- a/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.component.html +++ b/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.component.html @@ -2,7 +2,7 @@
- + Add User To Ombi @@ -105,7 +105,7 @@ - + Edit diff --git a/src/Ombi/ClientApp/src/styles/Styles.scss b/src/Ombi/ClientApp/src/styles/Styles.scss index 115555410..5b466c3a2 100644 --- a/src/Ombi/ClientApp/src/styles/Styles.scss +++ b/src/Ombi/ClientApp/src/styles/Styles.scss @@ -142,6 +142,10 @@ background-color: $ombi-active; } + a.mat-raised-button { + text-decoration:none; + } + hr { border-top: 1px solid $accent-dark; } diff --git a/src/Ombi/Controllers/V1/External/TesterController.cs b/src/Ombi/Controllers/V1/External/TesterController.cs index f18547e0f..6ee0ebe22 100644 --- a/src/Ombi/Controllers/V1/External/TesterController.cs +++ b/src/Ombi/Controllers/V1/External/TesterController.cs @@ -282,11 +282,18 @@ namespace Ombi.Controllers.V1.External { try { + var currentUser = await GetCurrentUserAsync(); + + if (!currentUser.Email.HasValue()) + { + throw new Exception($"User '{currentUser.UserName}' has no email address set on their user profile."); + } + var message = new NotificationMessage { Message = "This is just a test! Success!", Subject = $"Ombi: Test", - To = (await GetCurrentUserAsync()).Email, + To = currentUser.Email, }; message.Other.Add("PlainTextBody", "This is just a test! Success!"); @@ -539,7 +546,7 @@ namespace Ombi.Controllers.V1.External { var user = await UserManager.Users.Include(x => x.UserNotificationPreferences).FirstOrDefaultAsync(x => x.UserName == HttpContext.User.Identity.Name); - + var status = await WhatsAppApi.SendMessage(new WhatsAppModel { From = settings.From, diff --git a/src/Ombi/wwwroot/translations/en.json b/src/Ombi/wwwroot/translations/en.json index a9c40c197..3611b0249 100644 --- a/src/Ombi/wwwroot/translations/en.json +++ b/src/Ombi/wwwroot/translations/en.json @@ -60,7 +60,8 @@ "CheckPageForUpdates": "Check this page for continuous site updates." }, "ErrorPages": { - "NotFound": "Page not found" + "NotFound": "Page not found", + "SomethingWentWrong": "Something went wrong!" }, "NavigationBar": { "Discover": "Discover", diff --git a/version.json b/version.json index 13e40434e..336f02812 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "4.16.14" + "version": "4.16.17" } \ No newline at end of file