* Added the default streaming country to the user importer

pull/3970/head
tidusjar 4 years ago
parent 0936354df5
commit 93997116be

@ -212,6 +212,7 @@ export interface IUserManagementSettings extends ISettings {
bannedPlexUserIds: string[]; bannedPlexUserIds: string[];
bannedEmbyUserIds: string[]; bannedEmbyUserIds: string[];
bannedJellyfinUserIds: string[]; bannedJellyfinUserIds: string[];
defaultStreamingCountry: string;
} }
export interface IAbout { export interface IAbout {

@ -13,13 +13,13 @@
Import Plex Users</mat-slide-toggle> Import Plex Users</mat-slide-toggle>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<mat-slide-toggle id="importAdmin" [(ngModel)]="settings.importPlexAdmin">Import Plex Admin</mat-slide-toggle> <mat-slide-toggle id="importAdmin" [(ngModel)]="settings.importPlexAdmin">Import Plex Admin</mat-slide-toggle>
</div> </div>
<div *ngIf="plexUsers"> <div *ngIf="plexUsers">
<p>Plex Users excluded from Import</p> <p>Plex Users excluded from Import</p>
<p-autoComplete [(ngModel)]="bannedPlexUsers" [suggestions]="filteredPlexUsers" [multiple]="true" field="username" (completeMethod)="filterPlexList($event)"></p-autoComplete> <p-autoComplete [(ngModel)]="bannedPlexUsers" [suggestions]="filteredPlexUsers" [multiple]="true" field="username" (completeMethod)="filterPlexList($event)"></p-autoComplete>
</div> </div>
</div> </div>
@ -27,10 +27,10 @@
<div class="form-group"> <div class="form-group">
<mat-slide-toggle id="importEmbyUsers" [(ngModel)]="settings.importEmbyUsers">Import Emby Users</mat-slide-toggle> <mat-slide-toggle id="importEmbyUsers" [(ngModel)]="settings.importEmbyUsers">Import Emby Users</mat-slide-toggle>
</div> </div>
<div *ngIf="embyUsers"> <div *ngIf="embyUsers">
<p>Emby Users excluded from Import</p> <p>Emby Users excluded from Import</p>
<p-autoComplete [(ngModel)]="bannedEmbyUsers" [suggestions]="filteredEmbyUsers" [multiple]="true" field="username" (completeMethod)="filterEmbyList($event)"></p-autoComplete> <p-autoComplete [(ngModel)]="bannedEmbyUsers" [suggestions]="filteredEmbyUsers" [multiple]="true" field="username" (completeMethod)="filterEmbyList($event)"></p-autoComplete>
</div> </div>
@ -75,6 +75,15 @@
</div> </div>
</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>
<div class="form-group"> <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"> <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">

@ -29,6 +29,7 @@ export class UserManagementComponent implements OnInit {
public bannedJellyfinUsers: IUsersModel[] = []; public bannedJellyfinUsers: IUsersModel[] = [];
public enableImportButton = false; public enableImportButton = false;
public countries: string[];
constructor(private readonly settingsService: SettingsService, constructor(private readonly settingsService: SettingsService,
private readonly notificationService: NotificationService, private readonly notificationService: NotificationService,
@ -40,6 +41,7 @@ export class UserManagementComponent implements OnInit {
} }
public ngOnInit(): void { public ngOnInit(): void {
this.identityService.getSupportedStreamingCountries().subscribe(x => this.countries = x);
this.settingsService.getUserManagementSettings().subscribe(x => { this.settingsService.getUserManagementSettings().subscribe(x => {
this.settings = x; this.settings = x;

Loading…
Cancel
Save