mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-01-01 22:37:48 +00:00
Fixed: Abort if calibre detects duplicate
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user