mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 21:33:15 -07:00
Users can now see the music search tab #2493
This commit is contained in:
parent
e120784723
commit
7d50a845cc
3 changed files with 17 additions and 1 deletions
|
@ -20,7 +20,7 @@ export class SearchComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public ngOnInit() {
|
public ngOnInit() {
|
||||||
this.settingsService.getLidarr().subscribe(x => this.musicEnabled = x.enabled);
|
this.settingsService.lidarrEnabled().subscribe(x => this.musicEnabled = x);
|
||||||
this.showMovie = true;
|
this.showMovie = true;
|
||||||
this.showTv = false;
|
this.showTv = false;
|
||||||
this.showMusic = false;
|
this.showMusic = false;
|
||||||
|
|
|
@ -96,6 +96,10 @@ export class SettingsService extends ServiceHelpers {
|
||||||
return this.http.get<ILidarrSettings>(`${this.url}/Lidarr`, {headers: this.headers});
|
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> {
|
public saveLidarr(settings: ILidarrSettings): Observable<boolean> {
|
||||||
return this.http.post<boolean>(`${this.url}/Lidarr`, JSON.stringify(settings), {headers: this.headers});
|
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>();
|
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>
|
/// <summary>
|
||||||
/// Save the Lidarr settings.
|
/// Save the Lidarr settings.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue