mirror of
https://github.com/Readarr/Readarr.git
synced 2026-01-31 01:02:20 -05:00
Fixed: Abort if calibre detects duplicate
This commit is contained in:
@@ -72,7 +72,14 @@ public CalibreImportJob AddBook(BookFile book, CalibreSettings settings)
|
||||
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