diff --git a/README.md b/README.md index 8d78a75..76ac30f 100644 --- a/README.md +++ b/README.md @@ -210,7 +210,7 @@ async Zotero.arXivWorkflow.updatePDF( This function assumes that the argument is an journal item, and no checks will be performed to ensure this. The function caller is responsible to perform the checks. -Under the hood, this just calls `Zotero.Attachments.addAvailablePDF` and limits the download source to DOI only. +Under the hood, this just calls `Zotero.Attachments.addAvailableFile` and limits the download source to DOI only. diff --git a/src/modules/arxiv-update.ts b/src/modules/arxiv-update.ts index 6a481b3..763b1e1 100644 --- a/src/modules/arxiv-update.ts +++ b/src/modules/arxiv-update.ts @@ -97,10 +97,10 @@ export class arXivUpdate { ) { popupWin.changeLine({ text: tr("download-pdf"), progress: 60 }); popupWin.show(-1); - const attachment = await Zotero.Attachments.addAvailablePDF( + // @ts-ignore zotero-type mistake + const attachment = await Zotero.Attachments.addAvailableFile( journalItem, { - // @ts-ignore zotero-type mistake methods: ["doi"], // Only download from publisher }, ); diff --git a/src/modules/update-pdf.ts b/src/modules/update-pdf.ts index 21b8427..bc78247 100644 --- a/src/modules/update-pdf.ts +++ b/src/modules/update-pdf.ts @@ -37,9 +37,9 @@ export class UpdatePDF { progress: 0, }); popupWin.show(-1); - const attachmentItem = await Zotero.Attachments.addAvailablePDF( + // @ts-ignore zotero-type mistake + const attachmentItem = await Zotero.Attachments.addAvailableFile( journalItem, - // @ts-ignore zotero-type mistake { methods: ["doi"] }, // Only download from publisher ); if (attachmentItem) {