mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 02:26:55 -07:00
Allow Lidarr to specify if we should search for the album
This commit is contained in:
parent
85cbc08463
commit
7afcb1749a
5 changed files with 17 additions and 0 deletions
|
@ -116,6 +116,10 @@ namespace Ombi.Core.Senders
|
|||
}
|
||||
|
||||
var result = await _lidarrApi.MontiorAlbum(album.id, settings.ApiKey, settings.FullUri);
|
||||
if (!settings.AddOnly)
|
||||
{
|
||||
await _lidarrApi.AlbumSearch(new[] {result.id}, settings.ApiKey, settings.FullUri);
|
||||
}
|
||||
if (result.monitored)
|
||||
{
|
||||
return new SenderResult {Message = "Album has been requested!", Sent = true, Success = true};
|
||||
|
|
|
@ -11,5 +11,6 @@ namespace Ombi.Settings.Settings.Models.External
|
|||
public bool AlbumFolder { get; set; }
|
||||
public int LanguageProfileId { get; set; }
|
||||
public int MetadataProfileId { get; set; }
|
||||
public bool AddOnly { get; set; }
|
||||
}
|
||||
}
|
|
@ -93,6 +93,7 @@ export interface ILidarrSettings extends IExternalSettings {
|
|||
metadataProfileId: number;
|
||||
languageProfileId: number;
|
||||
albumFolder: boolean;
|
||||
addOnly: boolean;
|
||||
}
|
||||
|
||||
export interface ILandingPageSettings extends ISettings {
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
<div *ngIf="form">
|
||||
<fieldset>
|
||||
<legend>Lidarr Settings</legend>
|
||||
<div style="float: right;">
|
||||
<span style="vertical-align: top;">Advanced</span>
|
||||
<p-inputSwitch id="customInputSwitch" [(ngModel)]="advanced"></p-inputSwitch>
|
||||
</div>
|
||||
<form novalidate [formGroup]="form" (ngSubmit)="onSubmit(form)" style="padding-top:5%;">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
|
@ -110,6 +114,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" *ngIf="advanced" style="color:#ff761b">
|
||||
<div class="checkbox">
|
||||
<input type="checkbox" id="addOnly" formControlName="addOnly">
|
||||
<label for="addOnly">Do not search</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div>
|
||||
|
|
|
@ -45,6 +45,7 @@ export class LidarrComponent implements OnInit {
|
|||
albumFolder: [x.albumFolder],
|
||||
languageProfileId: [x.languageProfileId, [Validators.required]],
|
||||
metadataProfileId: [x.metadataProfileId, [Validators.required]],
|
||||
addOnly: [x.addOnly]
|
||||
});
|
||||
|
||||
if (x.defaultQualityProfile) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue