mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 21:13:28 -07:00
New: Sort import list groups
This commit is contained in:
parent
af26ac849a
commit
ba310fe66b
2 changed files with 6 additions and 1 deletions
|
@ -17,7 +17,10 @@ function createMapStateToProps() {
|
||||||
schema
|
schema
|
||||||
} = importLists;
|
} = importLists;
|
||||||
|
|
||||||
const listGroups = _.groupBy(schema, 'listType');
|
const listGroups = _.chain(schema)
|
||||||
|
.sortBy((o) => o.listOrder)
|
||||||
|
.groupBy('listType')
|
||||||
|
.value();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isSchemaFetching,
|
isSchemaFetching,
|
||||||
|
|
|
@ -11,6 +11,7 @@ namespace Lidarr.Api.V1.ImportLists
|
||||||
public int LanguageProfileId { get; set; }
|
public int LanguageProfileId { get; set; }
|
||||||
public int MetadataProfileId { get; set; }
|
public int MetadataProfileId { get; set; }
|
||||||
public ImportListType ListType { get; set; }
|
public ImportListType ListType { get; set; }
|
||||||
|
public int ListOrder { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ImportListResourceMapper : ProviderResourceMapper<ImportListResource, ImportListDefinition>
|
public class ImportListResourceMapper : ProviderResourceMapper<ImportListResource, ImportListDefinition>
|
||||||
|
@ -31,6 +32,7 @@ namespace Lidarr.Api.V1.ImportLists
|
||||||
resource.LanguageProfileId = definition.LanguageProfileId;
|
resource.LanguageProfileId = definition.LanguageProfileId;
|
||||||
resource.MetadataProfileId = definition.MetadataProfileId;
|
resource.MetadataProfileId = definition.MetadataProfileId;
|
||||||
resource.ListType = definition.ListType;
|
resource.ListType = definition.ListType;
|
||||||
|
resource.ListOrder = (int) definition.ListType;
|
||||||
|
|
||||||
return resource;
|
return resource;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue