mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 07:46:05 -07:00
Fixed
This commit is contained in:
parent
54c5765c5d
commit
c1db84e17c
3 changed files with 7 additions and 9 deletions
|
@ -111,8 +111,7 @@ namespace Ombi.Api.Lidarr
|
|||
request.AddQueryString("foreignAlbumId", albumId);
|
||||
AddHeaders(request, apiKey);
|
||||
var albums = await Api.Request<List<AlbumByForeignId>>(request);
|
||||
return albums.
|
||||
.FirstOrDefault();
|
||||
return albums.FirstOrDefault();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ namespace Ombi.Core.Engine
|
|||
|
||||
|
||||
// TODO
|
||||
private async Task<SearchAlbumViewModel> MapIntoAlbumVm(AlbumResponse a, LidarrSettings settings)
|
||||
private async Task<SearchAlbumViewModel> MapIntoAlbumVm(AlbumByForeignId a, LidarrSettings settings)
|
||||
{
|
||||
var vm = new SearchAlbumViewModel
|
||||
{
|
||||
|
@ -167,7 +167,10 @@ namespace Ombi.Core.Engine
|
|||
ReleaseDate = a.releaseDate,
|
||||
Title = a.title,
|
||||
Disk = a.images?.FirstOrDefault(x => x.coverType.Equals("disc"))?.url?.Replace("http", "https"),
|
||||
Genres = a.genres
|
||||
Genres = a.genres,
|
||||
AlbumType = a.albumType,
|
||||
ArtistName = a.artist.artistName,
|
||||
ForeignArtistId = a.artist.foreignArtistId,
|
||||
};
|
||||
if (a.artistId > 0)
|
||||
{
|
||||
|
@ -185,10 +188,6 @@ namespace Ombi.Core.Engine
|
|||
}
|
||||
|
||||
vm.Cover = a.images?.FirstOrDefault(x => x.coverType.Equals("cover"))?.url?.Replace("http", "https");
|
||||
if (vm.Cover.IsNullOrEmpty())
|
||||
{
|
||||
//vm.Cover = a.remoteCover;
|
||||
}
|
||||
|
||||
await Rules.StartSpecificRules(vm, SpecificRules.LidarrAlbum);
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace Ombi.Core.Rule.Rules.Request
|
|||
{
|
||||
if (await _manager.IsInRoleAsync(user, OmbiRoles.RequestTv) || await _manager.IsInRoleAsync(user, OmbiRoles.AutoApproveTv))
|
||||
{
|
||||
return TSuccess();
|
||||
return Success();
|
||||
}
|
||||
|
||||
return Fail("You do not have permissions to Request a TV Show");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue