mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 15:56: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);
|
request.AddQueryString("foreignAlbumId", albumId);
|
||||||
AddHeaders(request, apiKey);
|
AddHeaders(request, apiKey);
|
||||||
var albums = await Api.Request<List<AlbumByForeignId>>(request);
|
var albums = await Api.Request<List<AlbumByForeignId>>(request);
|
||||||
return albums.
|
return albums.FirstOrDefault();
|
||||||
.FirstOrDefault();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ namespace Ombi.Core.Engine
|
||||||
|
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
private async Task<SearchAlbumViewModel> MapIntoAlbumVm(AlbumResponse a, LidarrSettings settings)
|
private async Task<SearchAlbumViewModel> MapIntoAlbumVm(AlbumByForeignId a, LidarrSettings settings)
|
||||||
{
|
{
|
||||||
var vm = new SearchAlbumViewModel
|
var vm = new SearchAlbumViewModel
|
||||||
{
|
{
|
||||||
|
@ -167,7 +167,10 @@ namespace Ombi.Core.Engine
|
||||||
ReleaseDate = a.releaseDate,
|
ReleaseDate = a.releaseDate,
|
||||||
Title = a.title,
|
Title = a.title,
|
||||||
Disk = a.images?.FirstOrDefault(x => x.coverType.Equals("disc"))?.url?.Replace("http", "https"),
|
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)
|
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");
|
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);
|
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))
|
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");
|
return Fail("You do not have permissions to Request a TV Show");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue