New: Add old ids, artist aliases and genres

This commit is contained in:
ta264
2019-07-09 21:13:52 +01:00
parent 5ac46270ed
commit 76db27e8c2
16 changed files with 91 additions and 14 deletions
@@ -301,6 +301,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
{
Album album = new Album();
album.ForeignAlbumId = resource.Id;
album.OldForeignAlbumIds = resource.OldIds;
album.Title = resource.Title;
album.Overview = resource.Overview;
album.Disambiguation = resource.Disambiguation;
@@ -315,6 +316,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
album.SecondaryTypes = resource.SecondaryTypes.Select(MapSecondaryTypes).ToList();
album.Ratings = MapRatings(resource.Rating);
album.Links = resource.Links?.Select(MapLink).ToList();
album.Genres = resource.Genres;
album.CleanTitle = Parser.Parser.CleanArtistName(album.Title);
if (resource.Releases != null)
@@ -331,6 +333,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
{
AlbumRelease release = new AlbumRelease();
release.ForeignReleaseId = resource.Id;
release.OldForeignReleaseIds = resource.OldIds;
release.Title = resource.Title;
release.Status = resource.Status;
release.Label = resource.Label;
@@ -384,7 +387,9 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
ArtistMetadata = artistDict[resource.ArtistId],
Title = resource.TrackName,
ForeignTrackId = resource.Id,
OldForeignTrackIds = resource.OldIds,
ForeignRecordingId = resource.RecordingId,
OldForeignRecordingIds = resource.OldRecordingIds,
TrackNumber = resource.TrackNumber,
AbsoluteTrackNumber = resource.TrackPosition,
Duration = resource.DurationMs,
@@ -400,7 +405,9 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
ArtistMetadata artist = new ArtistMetadata();
artist.Name = resource.ArtistName;
artist.Aliases = resource.ArtistAliases;
artist.ForeignArtistId = resource.Id;
artist.OldForeignArtistIds = resource.OldIds;
artist.Genres = resource.Genres;
artist.Overview = resource.Overview;
artist.Disambiguation = resource.Disambiguation;