mirror of
https://github.com/Readarr/Readarr.git
synced 2026-09-19 09:46:28 -04:00
Fixed: Abort if calibre detects duplicate
This commit is contained in:
1 parent
b3aeeeef09
commit
400bc5f8bb
1 file changed
+8
-1
@@ -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