mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
Restabilized add artist flow with NodeJS API
This commit is contained in:
parent
dc0db08ca8
commit
bf7f890c48
4 changed files with 5 additions and 14 deletions
|
@ -17,14 +17,9 @@ namespace NzbDrone.Common.Cloud
|
||||||
Services = new HttpRequestBuilder("http://services.lidarr.tv/v1/")
|
Services = new HttpRequestBuilder("http://services.lidarr.tv/v1/")
|
||||||
.CreateFactory();
|
.CreateFactory();
|
||||||
|
|
||||||
//Search = new HttpRequestBuilder("https://api.spotify.com/{version}/{route}/") // TODO: maybe use {version}
|
Search = new HttpRequestBuilder("http://localhost:3000/{route}/") // TODO: Add {version} once LidarrAPI.Metadata is released.
|
||||||
// .SetSegment("version", "v1")
|
|
||||||
// .CreateFactory();
|
|
||||||
Search = new HttpRequestBuilder("http://localhost:3000/{route}/") // TODO: maybe use {version}
|
|
||||||
.CreateFactory();
|
.CreateFactory();
|
||||||
|
|
||||||
InternalSearch = new HttpRequestBuilder("https://itunes.apple.com/WebObjects/MZStore.woa/wa/{route}") //viewArtist or search
|
|
||||||
.CreateFactory();
|
|
||||||
|
|
||||||
SkyHookTvdb = new HttpRequestBuilder("http://skyhook.lidarr.tv/v1/tvdb/{route}/{language}/")
|
SkyHookTvdb = new HttpRequestBuilder("http://skyhook.lidarr.tv/v1/tvdb/{route}/{language}/")
|
||||||
.SetSegment("language", "en")
|
.SetSegment("language", "en")
|
||||||
|
|
|
@ -69,11 +69,8 @@ namespace NzbDrone.Core.MediaFiles
|
||||||
|
|
||||||
public List<string> FilterExistingFiles(List<string> files, Artist artist)
|
public List<string> FilterExistingFiles(List<string> files, Artist artist)
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
//var artistFiles = GetFilesByArtist(artist.ForeignArtistId).Select(f => Path.Combine(artist.Path, f.RelativePath)).ToList();
|
||||||
var artistFiles = GetFilesByArtist(artist.ForeignArtistId).Select(f => Path.Combine(artist.Path, f.RelativePath)).ToList();
|
|
||||||
=======
|
|
||||||
var artistFiles = GetFilesByArtist(artist.Id).Select(f => Path.Combine(artist.Path, f.RelativePath)).ToList();
|
var artistFiles = GetFilesByArtist(artist.Id).Select(f => Path.Combine(artist.Path, f.RelativePath)).ToList();
|
||||||
>>>>>>> fafe4e93f34fea769c9a64d9a98015821738b1e4
|
|
||||||
|
|
||||||
if (!artistFiles.Any()) return files;
|
if (!artistFiles.Any()) return files;
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||||
|
|
||||||
// We need to perform a direct lookup of the artist
|
// We need to perform a direct lookup of the artist
|
||||||
var httpRequest = _requestBuilder.Create()
|
var httpRequest = _requestBuilder.Create()
|
||||||
.SetSegment("route", "artists/" + foreignArtistId)
|
.SetSegment("route", "artist/" + foreignArtistId)
|
||||||
//.SetSegment("route", "search")
|
//.SetSegment("route", "search")
|
||||||
//.AddQueryParam("type", "artist,album")
|
//.AddQueryParam("type", "artist,album")
|
||||||
//.AddQueryParam("q", spotifyId.ToString())
|
//.AddQueryParam("q", spotifyId.ToString())
|
||||||
|
@ -227,7 +227,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
||||||
|
|
||||||
var httpRequest = _requestBuilder.Create()
|
var httpRequest = _requestBuilder.Create()
|
||||||
.SetSegment("route", "search")
|
.SetSegment("route", "search")
|
||||||
.AddQueryParam("type", "artist") // TODO: LidarrAPI.Metadata is getting , encoded. Needs to be raw ,
|
.AddQueryParam("type", "artist")
|
||||||
.AddQueryParam("query", title.ToLower().Trim())
|
.AddQueryParam("query", title.ToLower().Trim())
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|
|
@ -33,8 +33,7 @@ namespace NzbDrone.Core.Music
|
||||||
var successCount = 0;
|
var successCount = 0;
|
||||||
var failCount = 0;
|
var failCount = 0;
|
||||||
|
|
||||||
var existingTracks = _trackService.GetTracksByAlbum(album.ForeignAlbumId, album.ForeignAlbumId);
|
var existingTracks = _trackService.GetTracksByAlbum(album.ArtistId, album.Id); // TODO: JOE: I believe this should be string, string
|
||||||
//var albums = artist.Albums;
|
|
||||||
|
|
||||||
var updateList = new List<Track>();
|
var updateList = new List<Track>();
|
||||||
var newList = new List<Track>();
|
var newList = new List<Track>();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue