From dd94784642b9d315132d7f02f8056af01a61d217 Mon Sep 17 00:00:00 2001 From: twanariens Date: Sun, 7 Feb 2021 15:33:03 +0100 Subject: [PATCH 01/13] Optimizing TV details page --- .../tv-information-panel.component.html | 109 +++++++++--------- .../components/tv/tv-details.component.html | 4 +- .../media-details.component.scss | 17 +++ 3 files changed, 76 insertions(+), 54 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-information-panel/tv-information-panel.component.html b/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-information-panel/tv-information-panel.component.html index 777f4820e..2997cda3c 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-information-panel/tv-information-panel.component.html +++ b/src/Ombi/ClientApp/src/app/media-details/components/tv/panels/tv-information-panel/tv-information-panel.component.html @@ -1,63 +1,68 @@ -
- - {{tv.rating}}/10 - - - {{ratings.score}}% - - -
+
+
+
+ + {{tv.rating}}/10 + + + {{ratings.score}}% + +
+
+
+
+ {{'MediaDetails.StreamingOn' | translate }}: +
+ + + +
+
+

- {{'MediaDetails.StreamingOn' | translate }}: -
- - - +
+ {{'MediaDetails.Status' | translate }}: + {{tv.status}}
+ First Aired: + {{tv.firstAired | date: 'mediumDate'}}
-
-
- {{'MediaDetails.Status' | translate }}: - {{tv.status}} -
- First Aired: - {{tv.firstAired | date: 'mediumDate'}} -
-
- Seasons: - {{seasonCount}} -
-
- Episodes: - {{totalEpisodes}} -
+
+ Seasons: + {{seasonCount}} +
+
+ Episodes: + {{totalEpisodes}} +
-
- {{'MediaDetails.RootFolderOverride' | translate }}: -
{{request.rootPathOverrideTitle}}
-
-
- {{'MediaDetails.QualityOverride' | translate }}: -
{{request.qualityOverrideTitle}}
-
+
+ {{'MediaDetails.RootFolderOverride' | translate }}: +
{{request.rootPathOverrideTitle}}
+
+
+ {{'MediaDetails.QualityOverride' | translate }}: +
{{request.qualityOverrideTitle}}
+
-
- {{'MediaDetails.Runtime' | translate }}: - {{'MediaDetails.Minutes' | translate:{ runtime: tv.runtime} }} -
+
+ {{'MediaDetails.Runtime' | translate }}: + {{'MediaDetails.Minutes' | translate:{ runtime: tv.runtime} }} +
-
- Network: - {{tv.network.name}} -
+
+ Network: + {{tv.network.name}} +
-
- {{'MediaDetails.Genres' | translate }}: -
- - {{genre}} | - +
+ {{'MediaDetails.Genres' | translate }}: +
+ + {{genre}} | + +
diff --git a/src/Ombi/ClientApp/src/app/media-details/components/tv/tv-details.component.html b/src/Ombi/ClientApp/src/app/media-details/components/tv/tv-details.component.html index 976fcfefc..62d1b5b77 100644 --- a/src/Ombi/ClientApp/src/app/media-details/components/tv/tv-details.component.html +++ b/src/Ombi/ClientApp/src/app/media-details/components/tv/tv-details.component.html @@ -67,8 +67,8 @@
- - + + diff --git a/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss b/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss index 037d9bd23..393901c42 100644 --- a/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss +++ b/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss @@ -288,6 +288,18 @@ font-weight:500; } +.left-panel-details .streaming-on-content{ + display:flex; + justify-content: center; + align-items: center; + flex-flow:row wrap; +} + +.left-panel-details .streaming-on-content .label{ + white-space:nowrap; + padding-right:10px; +} + .left-panel-details{ font-weight:100; } @@ -314,6 +326,11 @@ padding:2px 1.5em;; width:170px; margin-top:10px; + margin-left:10px; +} + +.media-row .mat-raised-button:first-child{ + margin-left:0px; } @media (max-width:500px){ From b9680bb99aac17855499163948790ddd6c21d1ea Mon Sep 17 00:00:00 2001 From: twanariens Date: Sun, 7 Feb 2021 16:11:40 +0100 Subject: [PATCH 02/13] Quick fix for buttons on notification pages (still needs a complete rework) --- .../notifications/cloudmobile.component.html | 4 +- .../notifications/cloudmobile.coponent.ts | 1 + .../notifications/gotify.component.html | 4 +- .../notifications/mattermost.component.html | 4 +- .../notifications/mobile.component.html | 104 +++++++++--------- .../notificationtemplate.component.scss | 31 ++++-- .../notifications/pushbullet.component.html | 4 +- .../notifications/pushover.component.html | 4 +- .../notifications/slack.component.html | 4 +- .../notifications/telegram.component.html | 4 +- .../notifications/webhook.component.html | 4 +- src/Ombi/ClientApp/src/styles/Styles.scss | 12 ++ 12 files changed, 105 insertions(+), 75 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/settings/notifications/cloudmobile.component.html b/src/Ombi/ClientApp/src/app/settings/notifications/cloudmobile.component.html index a569a6ef4..dfb047fe8 100644 --- a/src/Ombi/ClientApp/src/app/settings/notifications/cloudmobile.component.html +++ b/src/Ombi/ClientApp/src/app/settings/notifications/cloudmobile.component.html @@ -1,6 +1,6 @@  -
+
Mobile Notifications @@ -47,7 +47,7 @@
- +
diff --git a/src/Ombi/ClientApp/src/app/settings/notifications/cloudmobile.coponent.ts b/src/Ombi/ClientApp/src/app/settings/notifications/cloudmobile.coponent.ts index e78860e09..3708f48a5 100644 --- a/src/Ombi/ClientApp/src/app/settings/notifications/cloudmobile.coponent.ts +++ b/src/Ombi/ClientApp/src/app/settings/notifications/cloudmobile.coponent.ts @@ -11,6 +11,7 @@ import { MatTableDataSource } from "@angular/material/table"; @Component({ templateUrl: "./cloudmobile.component.html", + styleUrls: ["./notificationtemplate.component.scss"] }) export class CloudMobileComponent implements OnInit { diff --git a/src/Ombi/ClientApp/src/app/settings/notifications/gotify.component.html b/src/Ombi/ClientApp/src/app/settings/notifications/gotify.component.html index 0b732fd74..9b2a7c938 100644 --- a/src/Ombi/ClientApp/src/app/settings/notifications/gotify.component.html +++ b/src/Ombi/ClientApp/src/app/settings/notifications/gotify.component.html @@ -42,7 +42,7 @@
- @@ -53,7 +53,7 @@
- +
diff --git a/src/Ombi/ClientApp/src/app/settings/notifications/mattermost.component.html b/src/Ombi/ClientApp/src/app/settings/notifications/mattermost.component.html index ea18e07e5..d7998c417 100644 --- a/src/Ombi/ClientApp/src/app/settings/notifications/mattermost.component.html +++ b/src/Ombi/ClientApp/src/app/settings/notifications/mattermost.component.html @@ -47,7 +47,7 @@
- @@ -58,7 +58,7 @@
- +
diff --git a/src/Ombi/ClientApp/src/app/settings/notifications/mobile.component.html b/src/Ombi/ClientApp/src/app/settings/notifications/mobile.component.html index b01a8b459..c5573c57e 100644 --- a/src/Ombi/ClientApp/src/app/settings/notifications/mobile.component.html +++ b/src/Ombi/ClientApp/src/app/settings/notifications/mobile.component.html @@ -3,71 +3,73 @@
Legacy Mobile Notifications -
-
-
-
- - - - - +
+
+ +
+
+
- Username/Alias - - Mobile Devices Registered -
+ + + + - - - - - - + + + + + + - -
+ Username/Alias + + Mobile Devices Registered +
- {{user.username}} - - {{user.devices}} -
+ {{user.username}} + + {{user.devices}} +
+ + +
-
-
-
- -
- +
+
+ +
+ +
-
-
-
- +
+
+ +
-
-
-
- +
+
+ +
-
-
-
- +
+
+ +
-
- -
+ +
-
- +
+ +
\ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/settings/notifications/notificationtemplate.component.scss b/src/Ombi/ClientApp/src/app/settings/notifications/notificationtemplate.component.scss index 33f8a2d6c..1ffd9207b 100644 --- a/src/Ombi/ClientApp/src/app/settings/notifications/notificationtemplate.component.scss +++ b/src/Ombi/ClientApp/src/app/settings/notifications/notificationtemplate.component.scss @@ -1,15 +1,30 @@ @import "~styles/shared.scss"; -::ng-deep ngb-accordion > div.card { - color:white; - padding-top: 0px; -} - -::ng-deep ngb-accordion > div.card > div.card-header { - padding:0px; -} .small-middle-container{ margin: auto; width: 95%; margin-top:10px; +} + +.lmobile-actions{ + display:flex; + justify-content: left; + align-items:flex-end; +} + +.lmobile-actions .form-group{ + margin-right:10px; +} + +.lmobile-container{ + display:flex; + margin-top:10px; +} + +.issue-content{ + justify-content: flex-end; +} + +.mat-raised-button{ + margin-right:10px; } \ No newline at end of file diff --git a/src/Ombi/ClientApp/src/app/settings/notifications/pushbullet.component.html b/src/Ombi/ClientApp/src/app/settings/notifications/pushbullet.component.html index 3c4db7698..e8115e4f5 100644 --- a/src/Ombi/ClientApp/src/app/settings/notifications/pushbullet.component.html +++ b/src/Ombi/ClientApp/src/app/settings/notifications/pushbullet.component.html @@ -32,7 +32,7 @@
- @@ -43,7 +43,7 @@
- +
diff --git a/src/Ombi/ClientApp/src/app/settings/notifications/pushover.component.html b/src/Ombi/ClientApp/src/app/settings/notifications/pushover.component.html index 8ce9b401d..926b344e0 100644 --- a/src/Ombi/ClientApp/src/app/settings/notifications/pushover.component.html +++ b/src/Ombi/ClientApp/src/app/settings/notifications/pushover.component.html @@ -74,7 +74,7 @@
- @@ -85,7 +85,7 @@
- +
diff --git a/src/Ombi/ClientApp/src/app/settings/notifications/slack.component.html b/src/Ombi/ClientApp/src/app/settings/notifications/slack.component.html index 15ef796fc..378e48060 100644 --- a/src/Ombi/ClientApp/src/app/settings/notifications/slack.component.html +++ b/src/Ombi/ClientApp/src/app/settings/notifications/slack.component.html @@ -57,7 +57,7 @@
- @@ -68,7 +68,7 @@
- +
diff --git a/src/Ombi/ClientApp/src/app/settings/notifications/telegram.component.html b/src/Ombi/ClientApp/src/app/settings/notifications/telegram.component.html index d89d14483..51e4c36d4 100644 --- a/src/Ombi/ClientApp/src/app/settings/notifications/telegram.component.html +++ b/src/Ombi/ClientApp/src/app/settings/notifications/telegram.component.html @@ -43,7 +43,7 @@
- @@ -52,7 +52,7 @@
- +
diff --git a/src/Ombi/ClientApp/src/app/settings/notifications/webhook.component.html b/src/Ombi/ClientApp/src/app/settings/notifications/webhook.component.html index 8ab28cc3c..aab095953 100644 --- a/src/Ombi/ClientApp/src/app/settings/notifications/webhook.component.html +++ b/src/Ombi/ClientApp/src/app/settings/notifications/webhook.component.html @@ -31,7 +31,7 @@
- @@ -40,7 +40,7 @@
- +
diff --git a/src/Ombi/ClientApp/src/styles/Styles.scss b/src/Ombi/ClientApp/src/styles/Styles.scss index df9e6028d..55bc8657c 100644 --- a/src/Ombi/ClientApp/src/styles/Styles.scss +++ b/src/Ombi/ClientApp/src/styles/Styles.scss @@ -145,3 +145,15 @@ hr{ border-top: 1px solid $ombi-background-primary; } + + .form-control{ + background-color: $ombi-background-accent; + color:#FFF; + border: 1px solid $ombi-background-accent; + } + + .form-control:focus{ + background-color: $ombi-background-accent; + color:#FFF; + border: 1px solid $ombi-active; + } From 23705d506982fff8bfd46e02569d9c042d248c04 Mon Sep 17 00:00:00 2001 From: twanariens Date: Mon, 8 Feb 2021 18:40:12 +0100 Subject: [PATCH 03/13] Fix for the buttons in mobile view on details page --- .../src/app/media-details/media-details.component.scss | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss b/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss index 393901c42..13886c0db 100644 --- a/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss +++ b/src/Ombi/ClientApp/src/app/media-details/media-details.component.scss @@ -329,10 +329,6 @@ margin-left:10px; } -.media-row .mat-raised-button:first-child{ - margin-left:0px; -} - @media (max-width:500px){ .row.justify-content-center.justify-content-sm-start.header-container{ flex-wrap:wrap; @@ -347,6 +343,7 @@ .media-row .mat-raised-button{ width:100%; + margin-left:0px; } .media-row .btn-spacing{ From 8f32ffcc901048a8301e17f732287e50d18ca8a2 Mon Sep 17 00:00:00 2001 From: ombi-bot <51722903+ombi-bot@users.noreply.github.com> Date: Mon, 8 Feb 2021 22:32:02 +0000 Subject: [PATCH 04/13] Update publish-job.yml for Azure Pipelines --- .azuredevops/pipelines/publish-job.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.azuredevops/pipelines/publish-job.yml b/.azuredevops/pipelines/publish-job.yml index f7f2d4605..78697830b 100644 --- a/.azuredevops/pipelines/publish-job.yml +++ b/.azuredevops/pipelines/publish-job.yml @@ -111,7 +111,8 @@ stages: $header = @{ "Accept"="application/vnd.github.v3+json" - "Authorization"="Bearer ${env:APTPAT}" + "Authorization"="Bearer $(APTPAT)" + "User-Agent"="Ombi" } Invoke-RestMethod -Uri "https://api.github.com/repos/Ombi-app/Ombi.Apt/actions/workflows/build-deb.yml/dispatches" -Method 'Post' -Body $body -Headers $header \ No newline at end of file From 53d605095b52da8e838d2992e27866edcf411edd Mon Sep 17 00:00:00 2001 From: tidusjar Date: Mon, 15 Feb 2021 14:59:15 +0000 Subject: [PATCH 05/13] Added Jellyfin to the landing page media checks --- .../Controllers/V1/LandingPageController.cs | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/Ombi/Controllers/V1/LandingPageController.cs b/src/Ombi/Controllers/V1/LandingPageController.cs index 54e1638b4..5f054165b 100644 --- a/src/Ombi/Controllers/V1/LandingPageController.cs +++ b/src/Ombi/Controllers/V1/LandingPageController.cs @@ -4,6 +4,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Ombi.Api.Emby; +using Ombi.Api.Jellyfin; using Ombi.Api.Plex; using Ombi.Core.Settings; using Ombi.Core.Settings.Models.External; @@ -18,19 +19,22 @@ namespace Ombi.Controllers.V1 public class LandingPageController : ControllerBase { public LandingPageController(ISettingsService plex, ISettingsService emby, - IPlexApi plexApi, IEmbyApiFactory embyApi) + IPlexApi plexApi, IEmbyApiFactory embyApi, ISettingsService jellyfin, IJellyfinApi jellyfinApi) { _plexSettings = plex; _embySettings = emby; _plexApi = plexApi; _embyApi = embyApi; + _jellyfin = jellyfin; + _jellyfinApi = jellyfinApi; } private readonly IPlexApi _plexApi; private readonly IEmbyApiFactory _embyApi; private readonly ISettingsService _plexSettings; private readonly ISettingsService _embySettings; - + private readonly ISettingsService _jellyfin; + private readonly IJellyfinApi _jellyfinApi; [HttpGet] public async Task GetMediaServerStatus() @@ -86,6 +90,31 @@ namespace Ombi.Controllers.V1 } } } + + + var jellyfin = await _jellyfin.GetSettingsAsync(); + if (jellyfin.Enable) + { + foreach (var server in jellyfin.Servers) + { + try + { + var result = await _jellyfinApi.GetUsers(server.FullUri, server.ApiKey); + if (result.Any()) + { + model.ServersAvailable++; + } + else + { + model.ServersUnavailable++; + } + } + catch (Exception) + { + model.ServersUnavailable++; + } + } + } return model; } } From f94f4ac1c0caf92ea7486460305c6ef074a607d9 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 17 Feb 2021 08:21:47 +0000 Subject: [PATCH 06/13] Fixed an issue with the test buttons on the *arr components not working correctly --- .../ClientApp/src/app/settings/lidarr/lidarr.component.ts | 2 +- .../ClientApp/src/app/settings/radarr/radarr.component.ts | 2 +- .../ClientApp/src/app/settings/sonarr/sonarr.component.ts | 2 +- src/Ombi/Controllers/V1/External/TesterController.cs | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/settings/lidarr/lidarr.component.ts b/src/Ombi/ClientApp/src/app/settings/lidarr/lidarr.component.ts index 5d8667db4..80420fc15 100644 --- a/src/Ombi/ClientApp/src/app/settings/lidarr/lidarr.component.ts +++ b/src/Ombi/ClientApp/src/app/settings/lidarr/lidarr.component.ts @@ -109,7 +109,7 @@ export class LidarrComponent implements OnInit { this.testerService.lidarrTest(settings).subscribe(result => { if (result.isValid) { this.notificationService.success("Successfully connected to Lidarr!"); - } else if (result.expectedSubDir !== null) { + } else if (result.expectedSubDir) { this.notificationService.error("Your Lidarr Base URL must be set to " + result.expectedSubDir); } else { this.notificationService.error("We could not connect to Lidarr!"); 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 df804a08c..d4c5a9883 100644 --- a/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts +++ b/src/Ombi/ClientApp/src/app/settings/radarr/radarr.component.ts @@ -99,7 +99,7 @@ export class RadarrComponent implements OnInit { this.testerService.radarrTest(settings).subscribe(result => { if (result.isValid) { this.notificationService.success("Successfully connected to Radarr!"); - } else if (result.expectedSubDir !== null) { + } else if (result.expectedSubDir) { this.notificationService.error("Your Radarr Base URL must be set to " + result.expectedSubDir); } else { this.notificationService.error("We could not connect to Radarr!"); diff --git a/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.ts b/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.ts index edd22bbdd..09f86859a 100644 --- a/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.ts +++ b/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.ts @@ -153,7 +153,7 @@ export class SonarrComponent implements OnInit { this.testerService.sonarrTest(settings).subscribe(result => { if (result.isValid) { this.notificationService.success("Successfully connected to Sonarr!"); - } else if (result.expectedSubDir !== null) { + } else if (result.expectedSubDir) { this.notificationService.error("Your Sonarr Base URL must be set to " + result.expectedSubDir); } else { this.notificationService.error("We could not connect to Sonarr!"); diff --git a/src/Ombi/Controllers/V1/External/TesterController.cs b/src/Ombi/Controllers/V1/External/TesterController.cs index 82182c012..7b9540a55 100644 --- a/src/Ombi/Controllers/V1/External/TesterController.cs +++ b/src/Ombi/Controllers/V1/External/TesterController.cs @@ -374,7 +374,7 @@ namespace Ombi.Controllers.V1.External var result = await RadarrApi.SystemStatus(settings.ApiKey, settings.FullUri); return new TesterResultModel { - IsValid = result.urlBase == settings.SubDir, + IsValid = result.urlBase == settings.SubDir || string.IsNullOrEmpty(result.urlBase) && string.IsNullOrEmpty(settings.SubDir), ExpectedSubDir = result.urlBase }; } @@ -399,7 +399,7 @@ namespace Ombi.Controllers.V1.External var result = await SonarrApi.SystemStatus(settings.ApiKey, settings.FullUri); return new TesterResultModel { - IsValid = result.urlBase == settings.SubDir, + IsValid = result.urlBase == settings.SubDir || string.IsNullOrEmpty(result.urlBase) && string.IsNullOrEmpty(settings.SubDir), ExpectedSubDir = result.urlBase }; } @@ -513,7 +513,7 @@ namespace Ombi.Controllers.V1.External var status = await LidarrApi.Status(settings.ApiKey, settings.FullUri); return new TesterResultModel { - IsValid = status?.urlBase == settings.SubDir, + IsValid = status?.urlBase == settings.SubDir || string.IsNullOrEmpty(result.urlBase) && string.IsNullOrEmpty(settings.SubDir), ExpectedSubDir = status?.urlBase }; } From 728741bfa14e88c4258636e52de9e09ba9c7ba7d Mon Sep 17 00:00:00 2001 From: tidusjar Date: Thu, 18 Feb 2021 22:49:02 +0000 Subject: [PATCH 07/13] Fixed the issue where we cannot delete a user #4050 --- src/Ombi.Core/Engine/UserDeletionEngine.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/Ombi.Core/Engine/UserDeletionEngine.cs b/src/Ombi.Core/Engine/UserDeletionEngine.cs index 6ea1e794d..7df394592 100644 --- a/src/Ombi.Core/Engine/UserDeletionEngine.cs +++ b/src/Ombi.Core/Engine/UserDeletionEngine.cs @@ -5,6 +5,7 @@ using Ombi.Store.Entities; using Ombi.Store.Entities.Requests; using Ombi.Store.Repository; using Ombi.Store.Repository.Requests; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -93,18 +94,27 @@ namespace Ombi.Core.Engine var issues = _issuesRepository.GetAll().Where(x => x.UserReportedId == userId); var issueComments = _issueCommentsRepository.GetAll().Where(x => x.UserId == userId); var requestLog = _requestLogRepository.GetAll().Where(x => x.UserId == userId); + + if (issueComments.Any()) + { + await _issueCommentsRepository.DeleteRange(issueComments); + } if (issues.Any()) { + var extraComments = new List(); + var issueIds = issues.Select(x => x.Id).Distinct(); + foreach (var issue in issueIds) + { + // Get all the comments for this issue and delete them, since the issue will be deleted + var extra = _issueCommentsRepository.GetAll().Where(x => x.IssuesId == issue); + extraComments.AddRange(extra.ToList()); + } await _issuesRepository.DeleteRange(issues); } if (requestLog.Any()) { await _requestLogRepository.DeleteRange(requestLog); } - if (issueComments.Any()) - { - await _issueCommentsRepository.DeleteRange(issueComments); - } // Delete the Subscriptions and mobile notification ids var subs = _requestSubscriptionRepository.GetAll().Where(x => x.UserId == userId); From c3810def36f6ccc0d43b3fcbf492a390e7e487ee Mon Sep 17 00:00:00 2001 From: tidusjar Date: Thu, 18 Feb 2021 22:55:39 +0000 Subject: [PATCH 08/13] Fixed build and added some nice little things --- src/Ombi/ClientApp/angular.json | 5 +++- src/Ombi/ClientApp/src/index.html | 25 ++++++++++++++++--- .../V1/External/TesterController.cs | 2 +- src/Ombi/Controllers/V1/ImagesController.cs | 4 +-- src/Ombi/appsettings.json | 16 ++++++++++++ 5 files changed, 44 insertions(+), 8 deletions(-) diff --git a/src/Ombi/ClientApp/angular.json b/src/Ombi/ClientApp/angular.json index 2e3ff44e5..41030a25a 100644 --- a/src/Ombi/ClientApp/angular.json +++ b/src/Ombi/ClientApp/angular.json @@ -124,5 +124,8 @@ } } }, - "defaultProject": "ombi" + "defaultProject": "ombi", + "cli": { + "analytics": false + } } \ No newline at end of file diff --git a/src/Ombi/ClientApp/src/index.html b/src/Ombi/ClientApp/src/index.html index 5659be377..3c0ac4956 100644 --- a/src/Ombi/ClientApp/src/index.html +++ b/src/Ombi/ClientApp/src/index.html @@ -35,6 +35,11 @@ console.log(window["baseHref"]); + @@ -61,8 +66,20 @@ diff --git a/src/Ombi/Controllers/V1/External/TesterController.cs b/src/Ombi/Controllers/V1/External/TesterController.cs index 7b9540a55..df6491578 100644 --- a/src/Ombi/Controllers/V1/External/TesterController.cs +++ b/src/Ombi/Controllers/V1/External/TesterController.cs @@ -513,7 +513,7 @@ namespace Ombi.Controllers.V1.External var status = await LidarrApi.Status(settings.ApiKey, settings.FullUri); return new TesterResultModel { - IsValid = status?.urlBase == settings.SubDir || string.IsNullOrEmpty(result.urlBase) && string.IsNullOrEmpty(settings.SubDir), + IsValid = status?.urlBase == settings.SubDir || string.IsNullOrEmpty(status.urlBase) && string.IsNullOrEmpty(settings.SubDir), ExpectedSubDir = status?.urlBase }; } diff --git a/src/Ombi/Controllers/V1/ImagesController.cs b/src/Ombi/Controllers/V1/ImagesController.cs index 249a6e9bd..c119efe70 100644 --- a/src/Ombi/Controllers/V1/ImagesController.cs +++ b/src/Ombi/Controllers/V1/ImagesController.cs @@ -203,7 +203,7 @@ namespace Ombi.Controllers.V1 var item = rand.Next(moviesArray.Length); var result = await _cache.GetOrAdd($"{CacheKeys.FanartTv}movie{moviesArray[item]}", async () => await FanartTvApi.GetMovieImages(moviesArray[item].ToString(), key.Value), DateTime.Now.AddDays(1)); - while (!result.moviebackground.Any()) + while (!result.moviebackground?.Any() ?? true) { item = rand.Next(moviesArray.Length); result = await _cache.GetOrAdd($"{CacheKeys.FanartTv}movie{moviesArray[item]}", async () => await FanartTvApi.GetMovieImages(moviesArray[item].ToString(), key.Value), DateTime.Now.AddDays(1)); @@ -220,7 +220,7 @@ namespace Ombi.Controllers.V1 var item = rand.Next(tvArray.Length); var result = await _cache.GetOrAdd($"{CacheKeys.FanartTv}tv{tvArray[item]}", async () => await FanartTvApi.GetTvImages(tvArray[item], key.Value), DateTime.Now.AddDays(1)); - while (!result.showbackground.Any()) + while (!result.showbackground?.Any() ?? true) { item = rand.Next(tvArray.Length); result = await _cache.GetOrAdd($"{CacheKeys.FanartTv}tv{tvArray[item]}", async () => await FanartTvApi.GetTvImages(tvArray[item], key.Value), DateTime.Now.AddDays(1)); diff --git a/src/Ombi/appsettings.json b/src/Ombi/appsettings.json index 9dcf5523a..8f1f3848d 100644 --- a/src/Ombi/appsettings.json +++ b/src/Ombi/appsettings.json @@ -25,24 +25,40 @@ 399106, 351286, 348350, + 539885, + 508442, + 664767, 260513, 372058, 299536, + 581389, + 577922, 383498, 330457, + 755812, + 495764, + 14160, 429617, 475557, 420818, + 775996, 283995 ], "TvShows": [ 121361, + 361753, + 295685, 74205, + 362392, 81189, 79126, + 332858, + 73762, 79349, + 349309, 275274, 305288, + 260449, 296762, 280619, 305074, From 7b3107962d43428b420b8177fe6aa5debe847318 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 24 Feb 2021 22:07:06 +0000 Subject: [PATCH 09/13] If the user has selected remember me, it will now last a very long time --- src/Ombi/Controllers/V1/TokenController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ombi/Controllers/V1/TokenController.cs b/src/Ombi/Controllers/V1/TokenController.cs index 66013ecf5..f9ea57a5c 100644 --- a/src/Ombi/Controllers/V1/TokenController.cs +++ b/src/Ombi/Controllers/V1/TokenController.cs @@ -146,7 +146,7 @@ namespace Ombi.Controllers.V1 var token = new JwtSecurityToken( claims: claims, - expires: rememberMe ? DateTime.Now.AddDays(7) : DateTime.Now.AddDays(1), + expires: rememberMe ? DateTime.Now.AddYears(1) : DateTime.Now.AddDays(7), signingCredentials: creds, audience: "Ombi", issuer: "Ombi" ); From c0149a6149b52a4a7c844c63ef13200ee5d12d23 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 24 Feb 2021 22:12:38 +0000 Subject: [PATCH 10/13] When using custom app name, show it on the login page --- src/Ombi/ClientApp/src/app/login/login.component.html | 3 ++- src/Ombi/ClientApp/src/app/login/login.component.scss | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Ombi/ClientApp/src/app/login/login.component.html b/src/Ombi/ClientApp/src/app/login/login.component.html index b0f4841fa..0769a185f 100644 --- a/src/Ombi/ClientApp/src/app/login/login.component.html +++ b/src/Ombi/ClientApp/src/app/login/login.component.html @@ -6,7 +6,8 @@