mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 08:16:05 -07:00
Fixed the mixed content warnings and the error when removing a album request #2884
This commit is contained in:
parent
c556334f79
commit
6dccea77c2
4 changed files with 10 additions and 9 deletions
|
@ -152,7 +152,8 @@ namespace Ombi.Core.Engine
|
||||||
Rating = a.ratings?.value ?? 0m,
|
Rating = a.ratings?.value ?? 0m,
|
||||||
ReleaseDate = a.releaseDate,
|
ReleaseDate = a.releaseDate,
|
||||||
Title = a.title,
|
Title = a.title,
|
||||||
Disk = a.images?.FirstOrDefault(x => x.coverType.Equals("disc"))?.url
|
Disk = a.images?.FirstOrDefault(x => x.coverType.Equals("disc"))?.url?.Replace("http","https"),
|
||||||
|
Genres = a.genres
|
||||||
};
|
};
|
||||||
if (a.artistId > 0)
|
if (a.artistId > 0)
|
||||||
{
|
{
|
||||||
|
@ -169,7 +170,7 @@ namespace Ombi.Core.Engine
|
||||||
vm.ArtistName = a.artist?.artistName;
|
vm.ArtistName = a.artist?.artistName;
|
||||||
}
|
}
|
||||||
|
|
||||||
vm.Cover = a.images?.FirstOrDefault(x => x.coverType.Equals("cover"))?.url;
|
vm.Cover = a.images?.FirstOrDefault(x => x.coverType.Equals("cover"))?.url?.Replace("http", "https");
|
||||||
if (vm.Cover.IsNullOrEmpty())
|
if (vm.Cover.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
vm.Cover = a.remoteCover;
|
vm.Cover = a.remoteCover;
|
||||||
|
|
|
@ -16,6 +16,7 @@ namespace Ombi.Core.Models.Search
|
||||||
public string Cover { get; set; }
|
public string Cover { get; set; }
|
||||||
public string Disk { get; set; }
|
public string Disk { get; set; }
|
||||||
public decimal PercentOfTracks { get; set; }
|
public decimal PercentOfTracks { get; set; }
|
||||||
|
public object[] Genres { get; set; }
|
||||||
public override RequestType Type => RequestType.Album;
|
public override RequestType Type => RequestType.Album;
|
||||||
public bool PartiallyAvailable => PercentOfTracks != 100 && PercentOfTracks > 0;
|
public bool PartiallyAvailable => PercentOfTracks != 100 && PercentOfTracks > 0;
|
||||||
public bool FullyAvailable => PercentOfTracks == 100;
|
public bool FullyAvailable => PercentOfTracks == 100;
|
||||||
|
|
|
@ -90,11 +90,10 @@ export class MusicRequestsComponent implements OnInit {
|
||||||
this.searchChanged.next(text.target.value);
|
this.searchChanged.next(text.target.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeRequest(request: IAlbumRequest) {
|
public async removeRequest(request: IAlbumRequest) {
|
||||||
this.requestService.removeAlbumRequest(request).subscribe(x => {
|
await this.requestService.removeAlbumRequest(request).toPromise();
|
||||||
this.removeRequestFromUi(request);
|
this.removeRequestFromUi(request);
|
||||||
this.loadRequests(this.amountToLoad, this.currentlyLoaded = 0);
|
this.loadRequests(this.amountToLoad, this.currentlyLoaded = 0);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public changeAvailability(request: IAlbumRequest, available: boolean) {
|
public changeAvailability(request: IAlbumRequest, available: boolean) {
|
||||||
|
@ -335,7 +334,7 @@ export class MusicRequestsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
private setAlbumBackground(req: IAlbumRequest) {
|
private setAlbumBackground(req: IAlbumRequest) {
|
||||||
if (req.disk === null) {
|
if (req.disk === null) {
|
||||||
if(req.cover === null) {
|
if (req.cover === null) {
|
||||||
req.disk = this.defaultPoster;
|
req.disk = this.defaultPoster;
|
||||||
} else {
|
} else {
|
||||||
req.disk = req.cover;
|
req.disk = req.cover;
|
||||||
|
|
|
@ -182,7 +182,7 @@ export class RequestService extends ServiceHelpers {
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeAlbumRequest(request: IAlbumRequest): any {
|
public removeAlbumRequest(request: IAlbumRequest): any {
|
||||||
this.http.delete(`${this.url}music/${request.id}`, {headers: this.headers}).subscribe();
|
return this.http.delete(`${this.url}music/${request.id}`, {headers: this.headers});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue