mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
Fixed: Unable to Add/Edit Metadata Profile after Release Status Addition
Fixes #260
This commit is contained in:
parent
121eb6db16
commit
9a50b69e8c
1 changed files with 20 additions and 9 deletions
|
@ -16,23 +16,34 @@ namespace Lidarr.Api.V1.Profiles.Metadata
|
||||||
private MetadataProfileResource GetAll()
|
private MetadataProfileResource GetAll()
|
||||||
{
|
{
|
||||||
var orderedPrimTypes = NzbDrone.Core.Music.PrimaryAlbumType.All
|
var orderedPrimTypes = NzbDrone.Core.Music.PrimaryAlbumType.All
|
||||||
.OrderByDescending(l => l.Id)
|
.OrderByDescending(l => l.Id)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
var orderedSecTypes = NzbDrone.Core.Music.SecondaryAlbumType.All
|
var orderedSecTypes = NzbDrone.Core.Music.SecondaryAlbumType.All
|
||||||
.OrderByDescending(l => l.Id)
|
.OrderByDescending(l => l.Id)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
var primTypes = orderedPrimTypes.Select(v => new ProfilePrimaryAlbumTypeItem {PrimaryAlbumType = v, Allowed = false})
|
var orderedRelStatuses = NzbDrone.Core.Music.ReleaseStatus.All
|
||||||
.ToList();
|
.OrderByDescending(l => l.Id)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
var secTypes = orderedSecTypes.Select(v => new ProfileSecondaryAlbumTypeItem { SecondaryAlbumType = v, Allowed = false })
|
var primTypes = orderedPrimTypes
|
||||||
.ToList();
|
.Select(v => new ProfilePrimaryAlbumTypeItem {PrimaryAlbumType = v, Allowed = false})
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
var secTypes = orderedSecTypes
|
||||||
|
.Select(v => new ProfileSecondaryAlbumTypeItem {SecondaryAlbumType = v, Allowed = false})
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
var relStatuses = orderedRelStatuses
|
||||||
|
.Select(v => new ProfileReleaseStatusItem {ReleaseStatus = v, Allowed = false})
|
||||||
|
.ToList();
|
||||||
|
|
||||||
var profile = new MetadataProfile
|
var profile = new MetadataProfile
|
||||||
{
|
{
|
||||||
PrimaryAlbumTypes = primTypes,
|
PrimaryAlbumTypes = primTypes,
|
||||||
SecondaryAlbumTypes = secTypes
|
SecondaryAlbumTypes = secTypes,
|
||||||
|
ReleaseStatuses = relStatuses
|
||||||
};
|
};
|
||||||
|
|
||||||
return profile.ToResource();
|
return profile.ToResource();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue