diff --git a/src/Ombi/ClientApp/app/search/search.component.ts b/src/Ombi/ClientApp/app/search/search.component.ts index 74221e71c..43d926970 100644 --- a/src/Ombi/ClientApp/app/search/search.component.ts +++ b/src/Ombi/ClientApp/app/search/search.component.ts @@ -20,7 +20,7 @@ export class SearchComponent implements OnInit { } public ngOnInit() { - this.settingsService.getLidarr().subscribe(x => this.musicEnabled = x.enabled); + this.settingsService.lidarrEnabled().subscribe(x => this.musicEnabled = x); this.showMovie = true; this.showTv = false; this.showMusic = false; diff --git a/src/Ombi/ClientApp/app/services/settings.service.ts b/src/Ombi/ClientApp/app/services/settings.service.ts index 2016d10b7..b4611bfa8 100644 --- a/src/Ombi/ClientApp/app/services/settings.service.ts +++ b/src/Ombi/ClientApp/app/services/settings.service.ts @@ -96,6 +96,10 @@ export class SettingsService extends ServiceHelpers { return this.http.get(`${this.url}/Lidarr`, {headers: this.headers}); } + public lidarrEnabled(): Observable { + return this.http.get(`${this.url}/lidarrenabled`, {headers: this.headers}); + } + public saveLidarr(settings: ILidarrSettings): Observable { return this.http.post(`${this.url}/Lidarr`, JSON.stringify(settings), {headers: this.headers}); } diff --git a/src/Ombi/Controllers/SettingsController.cs b/src/Ombi/Controllers/SettingsController.cs index 84192c53c..474ae8823 100644 --- a/src/Ombi/Controllers/SettingsController.cs +++ b/src/Ombi/Controllers/SettingsController.cs @@ -328,6 +328,18 @@ namespace Ombi.Controllers return await Get(); } + /// + /// Gets the Lidarr Settings. + /// + /// + [HttpGet("lidarrenabled")] + [AllowAnonymous] + public async Task LidarrEnabled() + { + var settings = await Get(); + return settings.Enabled; + } + /// /// Save the Lidarr settings. ///