mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-26 15:52:42 +00:00
Fixed: Temp fix for errors during import. Catch and report error.
Fixes #204 Co-Authored-By: Josh Jones <vertigo235@users.noreply.github.com>
This commit is contained in:
parent
221c670bf9
commit
9d7c6bc961
1 changed files with 14 additions and 4 deletions
|
@ -62,11 +62,21 @@ public List<Artist> AddArtists(List<Artist> newArtists)
|
||||||
foreach (var s in newArtists)
|
foreach (var s in newArtists)
|
||||||
{
|
{
|
||||||
// TODO: Verify if adding skyhook data will be slow
|
// TODO: Verify if adding skyhook data will be slow
|
||||||
|
try
|
||||||
|
{
|
||||||
var artist = AddSkyhookData(s);
|
var artist = AddSkyhookData(s);
|
||||||
artist = SetPropertiesAndValidate(artist);
|
artist = SetPropertiesAndValidate(artist);
|
||||||
artist.Added = added;
|
artist.Added = added;
|
||||||
artistsToAdd.Add(artist);
|
artistsToAdd.Add(artist);
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// Catch Import Errors for now until we get things fixed up
|
||||||
|
_logger.Debug("Failed to import id: {1} - {2}", s.ForeignArtistId, s.Name);
|
||||||
|
_logger.Error(ex, ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return _artistService.AddArtists(artistsToAdd);
|
return _artistService.AddArtists(artistsToAdd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue