Users can now see the music search tab #2493

pull/2519/head^2
TidusJar 6 years ago
parent e120784723
commit 7d50a845cc

@ -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;

@ -96,6 +96,10 @@ export class SettingsService extends ServiceHelpers {
return this.http.get<ILidarrSettings>(`${this.url}/Lidarr`, {headers: this.headers});
}
public lidarrEnabled(): Observable<boolean> {
return this.http.get<boolean>(`${this.url}/lidarrenabled`, {headers: this.headers});
}
public saveLidarr(settings: ILidarrSettings): Observable<boolean> {
return this.http.post<boolean>(`${this.url}/Lidarr`, JSON.stringify(settings), {headers: this.headers});
}

@ -328,6 +328,18 @@ namespace Ombi.Controllers
return await Get<LidarrSettings>();
}
/// <summary>
/// Gets the Lidarr Settings.
/// </summary>
/// <returns></returns>
[HttpGet("lidarrenabled")]
[AllowAnonymous]
public async Task<bool> LidarrEnabled()
{
var settings = await Get<LidarrSettings>();
return settings.Enabled;
}
/// <summary>
/// Save the Lidarr settings.
/// </summary>

Loading…
Cancel
Save