EPUB recognition: Fix DOI search results being thrown away
https://forums.zotero.org/discussion/116524/epub-articles-and-books-not-getting-metadata-like-pdfs
This commit is contained in:
parent
24aed7d530
commit
206496332d
3 changed files with 77 additions and 5 deletions
|
@ -624,14 +624,15 @@ Zotero.RecognizeDocument = new function () {
|
|||
saveAttachments: false
|
||||
});
|
||||
if (searchItemJSON) {
|
||||
if (search.ISBN && searchItemJSON?.ISBN?.split(' ')
|
||||
itemJSON = searchItemJSON;
|
||||
if (search.ISBN && searchItemJSON.ISBN && !searchItemJSON.ISBN.split(' ')
|
||||
.map(resolvedISBN => Zotero.Utilities.cleanISBN(resolvedISBN))
|
||||
.includes(search.ISBN)) {
|
||||
Zotero.debug('RecognizeDocument: Using ISBN search result');
|
||||
itemJSON = searchItemJSON;
|
||||
Zotero.debug(`RecognizeDocument: ISBN mismatch (was ${search.ISBN}, got ${searchItemJSON.ISBN})`);
|
||||
itemJSON = null;
|
||||
}
|
||||
else {
|
||||
Zotero.debug(`RecognizeDocument: ISBN mismatch (was ${search.ISBN}, got ${searchItemJSON.ISBN})`);
|
||||
Zotero.debug('RecognizeDocument: Using search result');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue