mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -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
|
@ -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