From 8f6ef2cdb275a646535dff1fbbdc5a763258d1c3 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 9 Dec 2020 21:45:44 +0000 Subject: [PATCH 1/7] Fixed #3907 --- .../usermanagement.component.html | 2 +- .../usermanagement/usermanagement.component.ts | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.component.html b/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.component.html index 4b64e2f45..af789e168 100644 --- a/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.component.html +++ b/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.component.html @@ -7,7 +7,7 @@ -
+
diff --git a/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.component.ts b/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.component.ts index 4071c6b8f..b412091a8 100644 --- a/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.component.ts +++ b/src/Ombi/ClientApp/src/app/usermanagement/usermanagement.component.ts @@ -10,7 +10,7 @@ import { SelectionModel } from "@angular/cdk/collections"; templateUrl: "./usermanagement.component.html", styleUrls: ["./usermanagement.component.scss"], }) -export class UserManagementComponent implements OnInit, AfterViewInit { +export class UserManagementComponent implements OnInit { public displayedColumns: string[] = ['select', 'username', 'alias', 'email', 'roles', 'remainingRequests', 'nextRequestDue', 'lastLoggedIn', 'userType', 'actions', 'welcome']; @@ -32,13 +32,15 @@ export class UserManagementComponent implements OnInit, AfterViewInit { constructor(private identityService: IdentityService, private settingsService: SettingsService, private notificationService: NotificationService, - private plexSettings: SettingsService) { } + private plexSettings: SettingsService) { + this.dataSource = new MatTableDataSource(); + } public async ngOnInit() { this.users = await this.identityService.getUsers().toPromise(); - this.dataSource = new MatTableDataSource(this.users); + this.dataSource.sort = this.sort; this.plexSettings.getPlex().subscribe(x => this.plexEnabled = x.enable); @@ -47,10 +49,6 @@ export class UserManagementComponent implements OnInit, AfterViewInit { this.settingsService.getEmailNotificationSettings().subscribe(x => this.emailSettings = x); } - public ngAfterViewInit(): void { - this.dataSource.sort = this.sort; - } - public welcomeEmail(user: IUser) { if (!user.emailAddress) { this.notificationService.error("The user needs an email address."); @@ -103,6 +101,9 @@ export class UserManagementComponent implements OnInit, AfterViewInit { } public isAllSelected() { + if (!this.dataSource) { + return; + } const numSelected = this.selection.selected.length; const numRows = this.dataSource.data.length; return numSelected === numRows; @@ -110,6 +111,9 @@ export class UserManagementComponent implements OnInit, AfterViewInit { public masterToggle() { + if (!this.dataSource) { + return; + } this.isAllSelected() ? this.selection.clear() : this.dataSource.data.forEach(row => this.selection.select(row)); From e22cc1ca150d4457d5097915086be0e50bb93683 Mon Sep 17 00:00:00 2001 From: David Roizenman Date: Wed, 9 Dec 2020 17:51:37 -0800 Subject: [PATCH 2/7] Remove remaining smart quotes --- src/Ombi/Views/Shared/_Layout.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ombi/Views/Shared/_Layout.cshtml b/src/Ombi/Views/Shared/_Layout.cshtml index 22c6c98f1..5cee9c275 100644 --- a/src/Ombi/Views/Shared/_Layout.cshtml +++ b/src/Ombi/Views/Shared/_Layout.cshtml @@ -82,7 +82,7 @@ - + -
-
- - -
+
+ + Running as a Windows Service +
-
-
- - -
+
+ + Use your own updater script +
- +
-
- - +
+ Windows Service Name + +
For information how to use this, please press the wiki button at the top of the page -
- - +
+ + Script Path + +
By default the process name is Ombi, but this could be different for your system. We need to know the process name so we can kill that process to update the files. -
- - +
+ + Ombi Process Name + +
-
-
- -
-
-
-
+ + +
If you are getting any permissions issues, you can specify a user for the update process to run under. -
- - +
+ + Username + +
-
- - +
+ + Password + + +
+
+
+
+
diff --git a/src/Ombi/ClientApp/src/app/settings/update/update.component.scss b/src/Ombi/ClientApp/src/app/settings/update/update.component.scss index 60e52d81a..044e7eb2d 100644 --- a/src/Ombi/ClientApp/src/app/settings/update/update.component.scss +++ b/src/Ombi/ClientApp/src/app/settings/update/update.component.scss @@ -1,5 +1,8 @@ -.small-middle-container{ - margin: auto; - width: 85%; - margin-top:10px; +.small-middle-container { + margin: auto; + width: 95%; + margin-top: 10px; } +.textEntry { + width: 300px; +} \ No newline at end of file From 093fb673ed5dbfa24de69df7aa2eb7f522ac455a Mon Sep 17 00:00:00 2001 From: goldenpipes Date: Mon, 14 Dec 2020 18:56:10 -0600 Subject: [PATCH 4/7] added a new class for the login card to allow changing the card colour, etc --- src/Ombi/ClientApp/src/app/login/login.component.html | 2 +- src/Ombi/ClientApp/src/app/login/login.component.scss | 3 +++ 2 files changed, 4 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 9fcc4c1ee..27b8d827a 100644 --- a/src/Ombi/ClientApp/src/app/login/login.component.html +++ b/src/Ombi/ClientApp/src/app/login/login.component.html @@ -3,7 +3,7 @@
- +
- Available - Processing - Request + {{'Common.Available' | translate}} + {{'Common.ProcessingRequest' | translate}} Selected Pending Approval + id="pendingApprovalLabel">{{'Common.PendingApproval' | translate}} Not Requested From e6751903a76df66d83d46ce93ed9f3172d8cc459 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Thu, 17 Dec 2020 21:42:58 +0000 Subject: [PATCH 7/7] Fixed an issue where we could grab the wrong imdbid --- .../Jobs/Ombi/RefreshMetadata.cs | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs b/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs index 30878adaf..f7d9ae1d2 100644 --- a/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs +++ b/src/Ombi.Schedule/Jobs/Ombi/RefreshMetadata.cs @@ -128,7 +128,7 @@ namespace Ombi.Schedule.Jobs.Ombi if (!hasImdb) { - var id = await GetImdbId(hasTheMovieDb, hasTvDbId, show.Title, show.TheMovieDbId, show.TvDbId); + var id = await GetImdbId(hasTheMovieDb, hasTvDbId, show.Title, show.TheMovieDbId, show.TvDbId, RequestType.TvShow); show.ImdbId = id; _plexRepo.UpdateWithoutSave(show); } @@ -162,7 +162,7 @@ namespace Ombi.Schedule.Jobs.Ombi if (!hasImdb) { - var id = await GetImdbId(hasTheMovieDb, hasTvDbId, show.Title, show.TheMovieDbId, show.TvDbId); + var id = await GetImdbId(hasTheMovieDb, hasTvDbId, show.Title, show.TheMovieDbId, show.TvDbId, RequestType.TvShow); show.ImdbId = id; _embyRepo.UpdateWithoutSave(show); } @@ -193,7 +193,7 @@ namespace Ombi.Schedule.Jobs.Ombi if (!hasImdb) { - var imdbId = await GetImdbId(hasTheMovieDb, false, movie.Title, movie.TheMovieDbId, string.Empty); + var imdbId = await GetImdbId(hasTheMovieDb, false, movie.Title, movie.TheMovieDbId, string.Empty, RequestType.Movie); movie.ImdbId = imdbId; _plexRepo.UpdateWithoutSave(movie); } @@ -247,7 +247,7 @@ namespace Ombi.Schedule.Jobs.Ombi if (!movie.HasImdb) { - var imdbId = await GetImdbId(movie.HasTheMovieDb, false, movie.Title, movie.TheMovieDbId, string.Empty); + var imdbId = await GetImdbId(movie.HasTheMovieDb, false, movie.Title, movie.TheMovieDbId, string.Empty, RequestType.Movie); movie.ImdbId = imdbId; _embyRepo.UpdateWithoutSave(movie); } @@ -305,7 +305,7 @@ namespace Ombi.Schedule.Jobs.Ombi return string.Empty; } - private async Task GetImdbId(bool hasTheMovieDb, bool hasTvDbId, string title, string theMovieDbId, string tvDbId) + private async Task GetImdbId(bool hasTheMovieDb, bool hasTvDbId, string title, string theMovieDbId, string tvDbId, RequestType type) { _log.LogInformation("The media item {0} does not have a ImdbId, searching for ImdbId", title); // Looks like TV Maze does not provide the moviedb id, neither does the TV endpoint on TheMovieDb @@ -314,13 +314,22 @@ namespace Ombi.Schedule.Jobs.Ombi _log.LogInformation("The show {0} has TheMovieDbId but not ImdbId, searching for ImdbId", title); if (int.TryParse(theMovieDbId, out var id)) { - var result = await _movieApi.GetTvExternals(id); - - return result.imdb_id; + switch (type) + { + case RequestType.TvShow: + var result = await _movieApi.GetTvExternals(id); + return result.imdb_id; + case RequestType.Movie: + var r = await _movieApi.GetMovieInformationWithExtraInfo(id); + return r.ImdbId; + default: + break; + } + } } - if (hasTvDbId) + if (hasTvDbId && type == RequestType.TvShow) { _log.LogInformation("The show {0} has tvdbid but not ImdbId, searching for ImdbId", title); if (int.TryParse(tvDbId, out var id))