mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Add Album Label Support from Metadata
This commit is contained in:
parent
405e7f981d
commit
fbe6bfc78e
9 changed files with 12 additions and 10 deletions
|
@ -175,7 +175,7 @@ EpisodeDetailsModalContent.propTypes = {
|
|||
nameSlug: PropTypes.string.isRequired,
|
||||
artistMonitored: PropTypes.bool.isRequired,
|
||||
releaseDate: PropTypes.string.isRequired,
|
||||
albumLabel: PropTypes.string.isRequired,
|
||||
albumLabel: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||
episodeTitle: PropTypes.string.isRequired,
|
||||
monitored: PropTypes.bool.isRequired,
|
||||
isSaving: PropTypes.bool,
|
||||
|
|
|
@ -75,7 +75,7 @@ function EpisodeAiring(props) {
|
|||
|
||||
EpisodeAiring.propTypes = {
|
||||
releaseDate: PropTypes.string.isRequired,
|
||||
albumLabel: PropTypes.string.isRequired,
|
||||
albumLabel: PropTypes.arrayOf(PropTypes.string).isRequired,
|
||||
shortDateFormat: PropTypes.string.isRequired,
|
||||
showRelativeDates: PropTypes.bool.isRequired,
|
||||
timeFormat: PropTypes.string.isRequired
|
||||
|
|
|
@ -153,7 +153,7 @@ class EpisodeSummary extends Component {
|
|||
EpisodeSummary.propTypes = {
|
||||
qualityProfileId: PropTypes.number.isRequired,
|
||||
overview: PropTypes.string,
|
||||
albumLabel: PropTypes.string,
|
||||
albumLabel: PropTypes.arrayOf(PropTypes.string),
|
||||
releaseDate: PropTypes.string.isRequired,
|
||||
path: PropTypes.string,
|
||||
size: PropTypes.number,
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Lidarr.Api.V3.Albums
|
|||
{
|
||||
public string Title { get; set; }
|
||||
public int ArtistId { get; set; }
|
||||
public string AlbumLabel { get; set; }
|
||||
public List<string> AlbumLabel { get; set; }
|
||||
public bool Monitored { get; set; }
|
||||
public string Path { get; set; }
|
||||
public int ProfileId { get; set; }
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace NzbDrone.Api.Albums
|
|||
|
||||
public string Title { get; set; }
|
||||
public int ArtistId { get; set; }
|
||||
public string Label { get; set; }
|
||||
public List<string> Label { get; set; }
|
||||
public bool Monitored { get; set; }
|
||||
public string Path { get; set; }
|
||||
public int ProfileId { get; set; }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
@ -20,7 +20,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
|
|||
public string Title { get; set; } // In case of a takedown, this may be empty
|
||||
public string Overview { get; set; }
|
||||
public List<string> Genres { get; set; }
|
||||
public string Label { get; set; }
|
||||
public List<string> Label { get; set; }
|
||||
public string Type { get; set; }
|
||||
public List<TrackResource> Tracks { get; set; }
|
||||
}
|
||||
|
|
|
@ -143,6 +143,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
|||
album.CleanTitle = Parser.Parser.CleanArtistTitle(album.Title);
|
||||
album.AlbumType = resource.Type;
|
||||
album.Images = resource.Images.Select(MapImage).ToList();
|
||||
album.Label = resource.Label;
|
||||
|
||||
var tracks = resource.Tracks.Select(MapTrack);
|
||||
album.Tracks = tracks.ToList();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Tv;
|
||||
using System;
|
||||
|
@ -22,7 +22,7 @@ namespace NzbDrone.Core.Music
|
|||
public string Title { get; set; }
|
||||
public string CleanTitle { get; set; }
|
||||
public DateTime? ReleaseDate { get; set; }
|
||||
public string Label { get; set; }
|
||||
public List<string> Label { get; set; }
|
||||
//public int TrackCount { get; set; }
|
||||
public string Path { get; set; }
|
||||
public int ProfileId { get; set; }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using NLog;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using NzbDrone.Core.Music.Events;
|
||||
|
@ -80,6 +80,7 @@ namespace NzbDrone.Core.Music
|
|||
albumToUpdate.ArtistId = artist.Id;
|
||||
albumToUpdate.AlbumType = album.AlbumType;
|
||||
albumToUpdate.Genres = album.Genres;
|
||||
albumToUpdate.Label = album.Label;
|
||||
albumToUpdate.Images = album.Images;
|
||||
albumToUpdate.ReleaseDate = album.ReleaseDate;
|
||||
albumToUpdate.Duration = album.Tracks.Sum(track => track.Duration);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue