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

Fixes #329
pull/6/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 { return {
key: albumRelease.id, 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.country.length > 0 ? ', ' : ''}${albumRelease.country}` +
`${albumRelease.disambiguation ? ', ' : ''}${titleCase(albumRelease.disambiguation)}` +
`${albumRelease.format ? ', [' : ''}${albumRelease.format}${albumRelease.format ? ']' : ''}` `${albumRelease.format ? ', [' : ''}${albumRelease.format}${albumRelease.format ? ']' : ''}`
}; };
}); });
const sortedValues = _.orderBy(values, ['value']);
const value = selectedRelease.value.id; const value = selectedRelease.value.id;
return { return {
values, values: sortedValues,
value value
}; };
} }

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

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

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

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

Loading…
Cancel
Save