|
|
<settings-menu></settings-menu>
|
|
|
<div *ngIf="form" class="small-middle-container">
|
|
|
<fieldset>
|
|
|
<legend>Sonarr Settings</legend>
|
|
|
<div class="md-form-field" style="margin-top:1em;"></div>
|
|
|
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)">
|
|
|
<div class="row top-spacing">
|
|
|
<div class="col-md-12 col-12 col-sm-12" >
|
|
|
<div >
|
|
|
<div class="md-form-field">
|
|
|
<mat-slide-toggle formControlName="enabled" id="enable">Enable</mat-slide-toggle>
|
|
|
</div>
|
|
|
<div class="md-form-field">
|
|
|
<mat-slide-toggle [(ngModel)]="advanced" [ngModelOptions]="{standalone: true}">Advanced</mat-slide-toggle>
|
|
|
</div>
|
|
|
<div class="md-form-field">
|
|
|
<mat-slide-toggle formControlName="scanForAvailability">Scan for Availability</mat-slide-toggle>
|
|
|
</div>
|
|
|
<div class="md-form-field">
|
|
|
<mat-slide-toggle formControlName="sendUserTags" id="sendUserTags">Add the user as a tag</mat-slide-toggle>
|
|
|
<small><br>This will add the username of the requesting user as a tag in Sonarr. If the tag doesn't exist, Ombi will create it.</small>
|
|
|
</div>
|
|
|
<div class="md-form-field" style="margin-top:1em;"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<div class="col-md-7 col-8 col-sm-12">
|
|
|
<label for="username" class="control-label"><h3>Sonarr Server Configuration</h3></label>
|
|
|
<div class="md-form-field">
|
|
|
<mat-form-field appearance="outline" floatLabel=always>
|
|
|
<mat-label>Sonarr Hostname or IP</mat-label>
|
|
|
<input matInput id="Ip" name="Ip" placeholder="Example: localhost" formControlName="ip" >
|
|
|
<mat-error>The IP/Hostname is required</mat-error>
|
|
|
</mat-form-field>
|
|
|
<mat-form-field appearance="outline" floatLabel=always>
|
|
|
<mat-label>Port</mat-label>
|
|
|
<input matInput id="port" name="port" placeholder="Example: 8989" formControlName="port">
|
|
|
<mat-error>The Port is required</mat-error>
|
|
|
</mat-form-field>
|
|
|
<mat-slide-toggle formControlName="ssl">SSL</mat-slide-toggle>
|
|
|
<div class="md-form-field" style="margin-top:1em;"></div>
|
|
|
</div>
|
|
|
<div class="md-form-field">
|
|
|
<mat-form-field appearance="outline" floatLabel=always>
|
|
|
<mat-label>Sonarr API Key</mat-label>
|
|
|
<input matInput id="apiKey" name="apiKey" placeholder="API Key" formControlName="apiKey">
|
|
|
<mat-error>The API Key is required</mat-error>
|
|
|
</mat-form-field>
|
|
|
</div>
|
|
|
|
|
|
<div class="md-form-field">
|
|
|
<mat-form-field appearance="outline" floatLabel=always>
|
|
|
<mat-label>Sonarr Base URL</mat-label>
|
|
|
<input matInput id="SubDir" name="SubDir" placeholder="Example: /sonarr" formControlName="subDir">
|
|
|
</mat-form-field>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-md-5 col-4 col-sm-12">
|
|
|
|
|
|
<div class="form-group col-md-12">
|
|
|
<div class="row">
|
|
|
<div class="col-md-12">
|
|
|
<button mat-raised-button id="profiles" type="button" (click)="getProfiles(form)" class="mat-stroked-button">
|
|
|
Load Qualities <span *ngIf="profilesRunning" class="fas fa-spinner fa-spin"></span></button>
|
|
|
<div class="md-form-field" style="margin-top:1em;"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<div id="profiles" class="col-md-6">
|
|
|
<div class="md-form-field" style="display:contents;">
|
|
|
<mat-form-field appearance="outline">
|
|
|
<mat-label>Quality Profiles</mat-label>
|
|
|
<mat-select formControlName="qualityProfile">
|
|
|
<mat-option *ngFor="let quality of qualities" value="{{quality.id}}">{{quality.name}} </mat-option>
|
|
|
</mat-select>
|
|
|
<mat-error>A Default Quality Profile is required</mat-error>
|
|
|
</mat-form-field>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
<div id="qualityProfileAnime" class="col-md-6">
|
|
|
<div class="md-form-field" style="display:contents;">
|
|
|
<mat-form-field appearance="outline">
|
|
|
<mat-label>Quality Profiles (Anime)</mat-label>
|
|
|
<mat-select formControlName="qualityProfileAnime">
|
|
|
<mat-option *ngFor="let quality of qualities" value="{{quality.id}}">{{quality.name}} </mat-option>
|
|
|
</mat-select>
|
|
|
<mat-error>A Default Quality Profile is required</mat-error>
|
|
|
</mat-form-field>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<div class="form-group col-md-12">
|
|
|
<div class="row">
|
|
|
<div class="col-md-12">
|
|
|
<button mat-raised-button id="rootFolder" type="button" (click)="getRootFolders(form)" class="mat-stroked-button">
|
|
|
Load Folders <span *ngIf="rootFoldersRunning" class="fas fa-spinner fa-spin"></span></button><div class="md-form-field" style="margin-top:1em;"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<div id="rootFolders" class="col-md-6">
|
|
|
<div class="md-form-field" style="display:contents;">
|
|
|
<mat-form-field appearance="outline">
|
|
|
<mat-label>Default Root Folders</mat-label>
|
|
|
<mat-select formControlName="rootPath">
|
|
|
<mat-option *ngFor="let folder of rootFolders" value="{{folder.id}}">{{folder.path}} </mat-option>
|
|
|
</mat-select>
|
|
|
<mat-error>A Default Root Folder is required</mat-error>
|
|
|
</mat-form-field>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
<div id="rootFoldersAnime" class="col-md-6">
|
|
|
<div class="md-form-field" style="display:contents;">
|
|
|
<mat-form-field appearance="outline">
|
|
|
<mat-label>Default Root Folders (Anime)</mat-label>
|
|
|
<mat-select formControlName="rootPathAnime">
|
|
|
<mat-option *ngFor="let folder of rootFoldersAnime" value="{{folder.id}}">{{folder.path}} </mat-option>
|
|
|
</mat-select>
|
|
|
<mat-error>A Default Root Folder (Anime) is required</mat-error>
|
|
|
</mat-form-field>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div></div>
|
|
|
|
|
|
<div class="form-group col-md-12">
|
|
|
<div class="row">
|
|
|
<div class="col-md-12">
|
|
|
<button mat-raised-button id="rootFolder" type="button" (click)="getTags(form)" class="mat-stroked-button">
|
|
|
Load Tags <span *ngIf="tagsRunning" class="fas fa-spinner fa-spin"></span></button><div class="md-form-field" style="margin-top:1em;"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<div id="tag" class="col-md-6">
|
|
|
<div class="md-form-field" style="display:contents;">
|
|
|
<mat-form-field appearance="outline">
|
|
|
<mat-label>Default Tag</mat-label>
|
|
|
<mat-select formControlName="tag">
|
|
|
<mat-option *ngFor="let tag of tags" [value]="tag.id">{{tag.label}} </mat-option>
|
|
|
</mat-select>
|
|
|
</mat-form-field>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div id="animeTag" class="col-md-6">
|
|
|
<div class="md-form-field" style="display:contents;">
|
|
|
<mat-form-field appearance="outline">
|
|
|
<mat-label>Anime Tags</mat-label>
|
|
|
<mat-select formControlName="animeTag">
|
|
|
<mat-option *ngFor="let tag of animeTags" [value]="tag.id">{{tag.label}} </mat-option>
|
|
|
</mat-select>
|
|
|
</mat-form-field>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div></div>
|
|
|
|
|
|
<div class="form-group col-md-12" *ngIf="sonarrVersion == '3'">
|
|
|
<label for="select" class="control-label">Language Profiles
|
|
|
<i *ngIf="form.get('languageProfile').hasError('required')" class="fas fa-exclamation-circle error-text" pTooltip="A Language Profile is required"></i>
|
|
|
</label>
|
|
|
|
|
|
|
|
|
<div class="md-form-field" style="display:inline">
|
|
|
<div class="row">
|
|
|
<div class="col-md-12">
|
|
|
<button type="button" mat-raised-button (click)="getLanguageProfiles(form)" class="mat-stroked-button">Load
|
|
|
Languages <span *ngIf="langRunning" class="fas fa-spinner fa-spin"> </span></button><div class="md-form-field" style="margin-top:1em;"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<div id="langaugeProfile" class="col-md-6">
|
|
|
|
|
|
<div class="md-form-field" style="display:contents;">
|
|
|
<mat-form-field appearance="outline">
|
|
|
<mat-label>Language Profiles</mat-label>
|
|
|
<mat-select formControlName="languageProfile">
|
|
|
<mat-option *ngFor="let lang of languageProfiles" [value]="lang.id">{{lang.name}}</mat-option>
|
|
|
</mat-select>
|
|
|
<mat-error>A Language Profile is required</mat-error>
|
|
|
</mat-form-field>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
<div id="langaugeProfileAnime" class="col-md-6">
|
|
|
<div class="md-form-field" style="display:contents;">
|
|
|
<mat-form-field appearance="outline">
|
|
|
<mat-label>Anime</mat-label>
|
|
|
<mat-select formControlName="languageProfileAnime">
|
|
|
<mat-option *ngFor="let lang of languageProfiles" [value]="lang.id">{{lang.name}}</mat-option>
|
|
|
</mat-select>
|
|
|
<mat-error>A Language Profile Anime is required</mat-error>
|
|
|
</mat-form-field>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<div class="form-group col-md-12">
|
|
|
<div class="checkbox">
|
|
|
<mat-slide-toggle id="SeasonFolders" name="SeasonFolders" formControlName="seasonFolders">Enable season folders</mat-slide-toggle>
|
|
|
</div><div class="md-form-field" style="margin-top:1em;"></div>
|
|
|
<label>If enabled Sonarr will organize seasons into separate folders within a show.</label>
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group col-md-12" *ngIf="advanced" style="color:#ff761b">
|
|
|
<div class="checkbox">
|
|
|
<mat-slide-toggle id="addOnly" formControlName="addOnly">Do not search</mat-slide-toggle>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="col-md-4">
|
|
|
|
|
|
<div class="form-group col-md-7">
|
|
|
<div>
|
|
|
<button mat-raised-button type="button" (click)="test(form)" class="mat-stroked-button">Test Connectivity
|
|
|
<span id="spinner"> </span></button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group col-md-7">
|
|
|
<div>
|
|
|
<button mat-raised-button type="submit" class="mat-stroked-button accent mat-accent">Submit</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
</form>
|
|
|
</fieldset>
|
|
|
</div>
|