Fixed: Abort if calibre detects duplicate

pull/755/head
ta264 4 years ago
parent b3aeeeef09
commit 400bc5f8bb

@ -72,7 +72,14 @@ namespace NzbDrone.Core.Books.Calibre
var request = builder.Build();
request.SetContent(body);
return _httpClient.Post<CalibreImportJob>(request).Resource;
var response = _httpClient.Post<CalibreImportJob>(request).Resource;
if (response.Id == 0)
{
throw new CalibreException("Calibre rejected duplicate book");
}
return response;
}
catch (HttpException ex)
{

Loading…
Cancel
Save