mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
New: Add old ids, artist aliases and genres
This commit is contained in:
@@ -9,9 +9,11 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
|
||||
public List<ArtistResource> Artists { get; set; }
|
||||
public string Disambiguation { get; set; }
|
||||
public string Overview { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
public List<string> OldIds { get; set; }
|
||||
public List<ImageResource> Images { get; set; }
|
||||
public List<LinkResource> Links { get; set; }
|
||||
public List<string> Genres { get; set; }
|
||||
public RatingResource Rating { get; set; }
|
||||
public DateTime? ReleaseDate { get; set; }
|
||||
public List<ReleaseResource> Releases { get; set; }
|
||||
|
||||
@@ -17,9 +17,11 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
|
||||
public string Type { get; set; }
|
||||
public string Disambiguation { get; set; }
|
||||
public string Id { get; set; }
|
||||
public List<string> OldIds { get; set; }
|
||||
public List<ImageResource> Images { get; set; }
|
||||
public List<LinkResource> Links { get; set; }
|
||||
public string ArtistName { get; set; }
|
||||
public List<string> ArtistAliases { get; set; }
|
||||
public List<AlbumResource> Albums { get; set; }
|
||||
public string Status { get; set; }
|
||||
public RatingResource Rating { get; set; }
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
|
||||
public List<string> Country { get; set; }
|
||||
public DateTime? ReleaseDate { get; set; }
|
||||
public string Id { get; set; }
|
||||
public List<string> OldIds { get; set; }
|
||||
public List<string> Label { get; set; }
|
||||
public List<MediumResource> Media { get; set; }
|
||||
public string Title { get; set; }
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
|
||||
{
|
||||
public class TrackResource
|
||||
@@ -10,7 +12,9 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource
|
||||
public string ArtistId { get; set; }
|
||||
public int DurationMs { get; set; }
|
||||
public string Id { get; set; }
|
||||
public List<string> OldIds { get; set; }
|
||||
public string RecordingId { get; set; }
|
||||
public List<string> OldRecordingIds { get; set; }
|
||||
public string TrackName { get; set; }
|
||||
public string TrackNumber { get; set; }
|
||||
public int TrackPosition { get; set; }
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user