Removed the lanuage profile from the Lidarr integration

pull/3200/head
tidusjar 5 years ago
parent 56c7cf973d
commit f04a203fac

@ -20,7 +20,6 @@ namespace Ombi.Api.Lidarr
Task<AlbumResponse> MontiorAlbum(int albumId, string apiKey, string baseUrl);
Task<List<AlbumResponse>> GetAllAlbumsByArtistId(int artistId, string apiKey, string baseUrl);
Task<List<MetadataProfile>> GetMetadataProfile(string apiKey, string baseUrl);
Task<List<LanguageProfiles>> GetLanguageProfile(string apiKey, string baseUrl);
Task<LidarrStatus> Status(string apiKey, string baseUrl);
Task<CommandResult> AlbumSearch(int[] albumIds, string apiKey, string baseUrl);
Task<AlbumByForeignId> AlbumInformation(string albumId, string apiKey, string baseUrl);

@ -158,13 +158,6 @@ namespace Ombi.Api.Lidarr
return Api.Request<List<AlbumResponse>>(request);
}
public Task<List<LanguageProfiles>> GetLanguageProfile(string apiKey, string baseUrl)
{
var request = new Request($"{ApiVersion}/languageprofile", baseUrl, HttpMethod.Get);
AddHeaders(request, apiKey);
return Api.Request<List<LanguageProfiles>>(request);
}
public Task<List<MetadataProfile>> GetMetadataProfile(string apiKey, string baseUrl)
{
var request = new Request($"{ApiVersion}/metadataprofile", baseUrl, HttpMethod.Get);

@ -17,7 +17,6 @@ namespace Ombi.Api.Lidarr.Models
public Image[] images { get; set; }
public string remotePoster { get; set; }
public int qualityProfileId { get; set; }
public int languageProfileId { get; set; }
public int metadataProfileId { get; set; }
public bool albumFolder { get; set; }
public bool monitored { get; set; }

@ -1,8 +0,0 @@
namespace Ombi.Api.Lidarr.Models
{
public class LanguageProfiles
{
public string name { get; set; }
public int id { get; set; }
}
}

@ -110,7 +110,6 @@ namespace Ombi.Core.Senders
artistName = model.ArtistName,
cleanName = model.ArtistName.ToLowerInvariant().RemoveSpaces(),
images = new Image[] { },
languageProfileId = settings.LanguageProfileId,
links = new Link[] {},
metadataProfileId = settings.MetadataProfileId,
qualityProfileId = qualityToUse,

@ -9,7 +9,6 @@ namespace Ombi.Settings.Settings.Models.External
public string DefaultQualityProfile { get; set; }
public string DefaultRootPath { get; set; }
public bool AlbumFolder { get; set; }
public int LanguageProfileId { get; set; }
public int MetadataProfileId { get; set; }
public bool AddOnly { get; set; }
}

@ -29,8 +29,5 @@ export class LidarrService extends ServiceHelpers {
public getMetadataProfiles(settings: ILidarrSettings): Observable<IProfiles[]> {
return this.http.post<IProfiles[]>(`${this.url}/Metadata/`, JSON.stringify(settings), {headers: this.headers});
}
public getLanguages(settings: ILidarrSettings): Observable<IProfiles[]> {
return this.http.post<IProfiles[]>(`${this.url}/Langauges/`,JSON.stringify(settings), {headers: this.headers});
}
}

@ -84,22 +84,6 @@
</div>
</div>
<div class="form-group">
<label for="languageProfileId" class="control-label">Language Profile
<i *ngIf="form.get('languageProfileId').hasError('required')" class="fa fa-exclamation-circle error-text" pTooltip="Language Profile is required"></i>
</label>
<div id="languageProfileId">
<select formControlName="languageProfileId" class="form-control form-control-custom col-md-5 form-half" [ngClass]="{'form-error': form.get('languageProfileId').hasError('required')}">
<option *ngFor="let folder of languageProfiles" value="{{folder.id}}" >{{folder.name}}</option>
</select>
<button (click)="getLanguageProfiles(form)" type="button" class="btn btn-primary-outline col-md-4 col-md-push-1">Get Languages <span *ngIf="rootFoldersRunning" class="fa fa-spinner fa-spin"></span></button>
</div>
</div>
<div class="form-group">
<label for="metadataProfileId" class="control-label">Metadata Profile

@ -12,14 +12,12 @@ import { SettingsService } from "../../services";
export class LidarrComponent implements OnInit {
public qualities: IRadarrProfile[];
public languageProfiles: IProfiles[];
public metadataProfiles: IProfiles[];
public rootFolders: IRadarrRootFolder[];
public minimumAvailabilityOptions: IMinimumAvailability[];
public profilesRunning: boolean;
public rootFoldersRunning: boolean;
public metadataRunning: boolean;
public languageRunning: boolean;
public advanced = false;
public form: FormGroup;
@ -43,7 +41,6 @@ export class LidarrComponent implements OnInit {
ip: [x.ip, [Validators.required]],
port: [x.port, [Validators.required]],
albumFolder: [x.albumFolder],
languageProfileId: [x.languageProfileId, [Validators.required]],
metadataProfileId: [x.metadataProfileId, [Validators.required]],
addOnly: [x.addOnly],
});
@ -54,9 +51,6 @@ export class LidarrComponent implements OnInit {
if (x.defaultRootPath) {
this.getRootFolders(this.form);
}
if (x.languageProfileId) {
this.getLanguageProfiles(this.form);
}
if (x.metadataProfileId) {
this.getMetadataProfiles(this.form);
}
@ -68,9 +62,6 @@ export class LidarrComponent implements OnInit {
this.rootFolders = [];
this.rootFolders.push({ path: "Please Select", id: -1 });
this.languageProfiles = [];
this.languageProfiles.push({ name: "Please Select", id: -1 });
this.metadataProfiles = [];
this.metadataProfiles.push({ name: "Please Select", id: -1 });
}
@ -108,17 +99,6 @@ export class LidarrComponent implements OnInit {
});
}
public getLanguageProfiles(form: FormGroup) {
this.languageRunning = true;
this.lidarrService.getLanguages(form.value).subscribe(x => {
this.languageProfiles = x;
this.languageProfiles.unshift({ name: "Please Select", id: -1 });
this.languageRunning = false;
this.notificationService.success("Successfully retrieved the Language profiles");
});
}
public test(form: FormGroup) {
if (form.invalid) {
this.notificationService.error("Please check your entered values");

@ -60,16 +60,6 @@ namespace Ombi.Controllers.External
{
return await _lidarrApi.GetMetadataProfile(settings.ApiKey, settings.FullUri);
}
/// <summary>
/// Gets the Lidarr Langauge profiles.
/// </summary>
/// <param name="settings">The settings.</param>
/// <returns></returns>
[HttpPost("Langauges")]
public async Task<IEnumerable<LanguageProfiles>> GetLanguageProfiles([FromBody] LidarrSettings settings)
{
return await _lidarrApi.GetLanguageProfile(settings.ApiKey, settings.FullUri);
}
/// <summary>
/// Gets the Lidarr profiles using the saved settings

Loading…
Cancel
Save