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

Fixes #329
pull/359/head
Qstick 7 years ago committed by GitHub
parent a794ed8860
commit ad6e651090
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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
};
}

@ -8,6 +8,7 @@ namespace Lidarr.Api.V1.Albums
public class AlbumReleaseResource
{
public string Id { get; set; }
public string Title { get; set; }
public DateTime? ReleaseDate { get; set; }
public int TrackCount { get; set; }
public int MediaCount { get; set; }
@ -29,6 +30,7 @@ namespace Lidarr.Api.V1.Albums
return new AlbumReleaseResource
{
Id = model.Id,
Title = model.Title,
ReleaseDate = model.ReleaseDate,
TrackCount = model.TrackCount,
MediaCount = model.MediaCount,
@ -49,6 +51,7 @@ namespace Lidarr.Api.V1.Albums
return new AlbumRelease
{
Id = resource.Id,
Title = resource.Title,
ReleaseDate = resource.ReleaseDate,
TrackCount = resource.TrackCount,
MediaCount = resource.MediaCount,

@ -12,6 +12,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
public string Disambiguation { get; set; }
public List<string> Label {get; set;}
public List<string> Country { get; set; }
public string Title { get; set; }
public string Format { get; set; }
}
}

@ -313,6 +313,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
AlbumRelease albumRelease = new AlbumRelease
{
Id = resource.Id,
Title = resource.Title,
ReleaseDate = resource.ReleaseDate,
TrackCount = resource.TrackCount,
Format = resource.Format,

@ -7,6 +7,7 @@ namespace NzbDrone.Core.Music
public class AlbumRelease : IEmbeddedDocument
{
public string Id { get; set; }
public string Title { get; set; }
public DateTime? ReleaseDate { get; set; }
public int TrackCount { get; set; }
public int MediaCount { get; set; }

Loading…
Cancel
Save