From 9d7c6bc9612fb014033b3933153d95a4d670e699 Mon Sep 17 00:00:00 2001 From: Qstick Date: Mon, 19 Mar 2018 22:09:56 -0400 Subject: [PATCH] Fixed: Temp fix for errors during import. Catch and report error. Fixes #204 Co-Authored-By: Josh Jones --- src/NzbDrone.Core/Music/AddArtistService.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/NzbDrone.Core/Music/AddArtistService.cs b/src/NzbDrone.Core/Music/AddArtistService.cs index ca9a32cb7..afb081c68 100644 --- a/src/NzbDrone.Core/Music/AddArtistService.cs +++ b/src/NzbDrone.Core/Music/AddArtistService.cs @@ -62,10 +62,20 @@ namespace NzbDrone.Core.Music foreach (var s in newArtists) { // TODO: Verify if adding skyhook data will be slow - var artist = AddSkyhookData(s); - artist = SetPropertiesAndValidate(artist); - artist.Added = added; - artistsToAdd.Add(artist); + try + { + var artist = AddSkyhookData(s); + artist = SetPropertiesAndValidate(artist); + artist.Added = added; + 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);