mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
More Work on Album Filtering per Artist
This commit is contained in:
@@ -37,7 +37,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public Tuple<Artist, List<Album>> GetArtistInfo(string foreignArtistId)
|
||||
public Tuple<Artist, List<Album>> GetArtistInfo(string foreignArtistId, List<string> primaryAlbumTypes, List<string> secondaryAlbumTypes)
|
||||
{
|
||||
|
||||
_logger.Debug("Getting Artist with LidarrAPI.MetadataID of {0}", foreignArtistId);
|
||||
@@ -46,10 +46,10 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
|
||||
var httpRequest = customerRequestBuilder.Create()
|
||||
.SetSegment("route", "artists/" + foreignArtistId)
|
||||
.AddQueryParam("primTypes", string.Join("|",primaryAlbumTypes))
|
||||
.AddQueryParam("secTypes", string.Join("|", secondaryAlbumTypes))
|
||||
.Build();
|
||||
|
||||
|
||||
|
||||
httpRequest.AllowAutoRedirect = true;
|
||||
httpRequest.SuppressHttpError = true;
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||
|
||||
try
|
||||
{
|
||||
return new List<Artist> { GetArtistInfo(slug).Item1 };
|
||||
return new List<Artist> { GetArtistInfo(slug, new List<string>{"Album"}, new List<string>{"Studio"}).Item1 };
|
||||
}
|
||||
catch (ArtistNotFoundException)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user