Skip to content

Commit

Permalink
* Added the default streaming country to the user importer
Browse files Browse the repository at this point in the history
  • Loading branch information
tidusjar committed Jan 8, 2021
1 parent 0936354 commit 9399711
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Ombi/ClientApp/src/app/interfaces/ISettings.ts
Expand Up @@ -212,6 +212,7 @@ export interface IUserManagementSettings extends ISettings {
bannedPlexUserIds: string[];
bannedEmbyUserIds: string[];
bannedJellyfinUserIds: string[];
defaultStreamingCountry: string;
}

export interface IAbout {
Expand Down
Expand Up @@ -13,24 +13,24 @@
Import Plex Users</mat-slide-toggle>
</div>
</div>

<div class="form-group">
<mat-slide-toggle id="importAdmin" [(ngModel)]="settings.importPlexAdmin">Import Plex Admin</mat-slide-toggle>
</div>
<div *ngIf="plexUsers">
<p>Plex Users excluded from Import</p>

<p-autoComplete [(ngModel)]="bannedPlexUsers" [suggestions]="filteredPlexUsers" [multiple]="true" field="username" (completeMethod)="filterPlexList($event)"></p-autoComplete>
</div>
</div>
<div *ngIf="embyEnabled">
<div class="form-group">
<mat-slide-toggle id="importEmbyUsers" [(ngModel)]="settings.importEmbyUsers">Import Emby Users</mat-slide-toggle>
</div>

<div *ngIf="embyUsers">
<p>Emby Users excluded from Import</p>

<p-autoComplete [(ngModel)]="bannedEmbyUsers" [suggestions]="filteredEmbyUsers" [multiple]="true" field="username" (completeMethod)="filterEmbyList($event)"></p-autoComplete>
</div>

Expand Down Expand Up @@ -75,6 +75,15 @@ <h4>Default Request Limits</h4>
</div>
</div>

<mat-form-field>
<mat-label [translate]="'UserPreferences.StreamingCountry'"></mat-label>
<mat-select [(value)]="settings.defaultStreamingCountry">
<mat-option *ngFor="let value of countries" [value]="value">
{{value}}
</mat-option>
</mat-select>
</mat-form-field>

</div>
<div class="form-group">
<button (click)="submit()" mat-raised-button type="submit" id="save" class="mat-focus-indicator mat-stroked-button accent mat-accent mat-raised-button mat-button-base" ng-reflect-disabled="false">
Expand Down
Expand Up @@ -29,6 +29,7 @@ export class UserManagementComponent implements OnInit {
public bannedJellyfinUsers: IUsersModel[] = [];

public enableImportButton = false;
public countries: string[];

constructor(private readonly settingsService: SettingsService,
private readonly notificationService: NotificationService,
Expand All @@ -40,6 +41,7 @@ export class UserManagementComponent implements OnInit {
}

public ngOnInit(): void {
this.identityService.getSupportedStreamingCountries().subscribe(x => this.countries = x);
this.settingsService.getUserManagementSettings().subscribe(x => {
this.settings = x;

Expand Down

0 comments on commit 9399711

Please sign in to comment.