New: Show Release Title on Release Selection (#343)

Fixes #329
This commit is contained in:
Qstick 2018-05-04 18:34:03 -04:00 committed by GitHub
parent a794ed8860
commit ad6e651090
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 3 deletions

View file

@ -15,17 +15,20 @@ function createMapStateToProps() {
return {
key: albumRelease.id,
value: `${albumRelease.mediaCount} med, ${albumRelease.trackCount} tracks` +
value: `${albumRelease.title}` +
`${albumRelease.disambiguation ? ' (' : ''}${titleCase(albumRelease.disambiguation)}${albumRelease.disambiguation ? ')' : ''}` +
`, ${albumRelease.mediaCount} med, ${albumRelease.trackCount} tracks` +
`${albumRelease.country.length > 0 ? ', ' : ''}${albumRelease.country}` +
`${albumRelease.disambiguation ? ', ' : ''}${titleCase(albumRelease.disambiguation)}` +
`${albumRelease.format ? ', [' : ''}${albumRelease.format}${albumRelease.format ? ']' : ''}`
};
});
const sortedValues = _.orderBy(values, ['value']);
const value = selectedRelease.value.id;
return {
values,
values: sortedValues,
value
};
}