Create automatic (not manual) tags when retrieving PDF metadata by ISBN
https://forums.zotero.org/discussion/71003/metadata-problem
This commit is contained in:
parent
a673956787
commit
67b34b1482
|
@ -577,6 +577,19 @@ Zotero.RecognizePDF = new function () {
|
||||||
Zotero.debug(translatedItems);
|
Zotero.debug(translatedItems);
|
||||||
if (translatedItems.length) {
|
if (translatedItems.length) {
|
||||||
let newItem = new Zotero.Item;
|
let newItem = new Zotero.Item;
|
||||||
|
// Convert tags to automatic. For other items this is done automatically in
|
||||||
|
// translate.js for other items, but for ISBNs we just get the data
|
||||||
|
// (libraryID=false) and do the saving manually.
|
||||||
|
translatedItems[0].tags = translatedItems[0].tags.map(tag => {
|
||||||
|
if (typeof tag == 'string') {
|
||||||
|
return {
|
||||||
|
tag,
|
||||||
|
type: 1
|
||||||
|
};
|
||||||
|
}
|
||||||
|
tag.type = 1;
|
||||||
|
return tag;
|
||||||
|
});
|
||||||
newItem.fromJSON(translatedItems[0]);
|
newItem.fromJSON(translatedItems[0]);
|
||||||
newItem.libraryID = libraryID;
|
newItem.libraryID = libraryID;
|
||||||
if (!newItem.abstractNote && res.abstract) {
|
if (!newItem.abstractNote && res.abstract) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user