Skip to content

Commit

Permalink
Fixing pdf error importing annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
frianasoa committed Oct 28, 2024
1 parent 036f8c5 commit 8f40296
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 12 deletions.
24 changes: 20 additions & 4 deletions core/nsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,26 @@ NSync = {
var attachments = child.getAttachments()
for(itemid of attachments)
{
let transfer = true;
let ispriority = true;
let pw = "";
await Zotero.PDFWorker.import(itemid, ispriority, pw, transfer);
let attachment = Zotero.Items.get(itemid);
if(attachment.isPDFAttachment)
{
try {
Zotero_File_Interface.Progress.show("Importing annotations "+itemid+" ... ")
let attachment = Zotero.Items.get(itemid)
let transfer = true;
let ispriority = true;
let pw = "";
await Zotero.PDFWorker.import(itemid, ispriority, pw, transfer);
}
catch(error)
{
Zotero.log("Error importing annotations: "+error);
}
}
else
{
Zotero_File_Interface.Progress.show("File not PDF, skipping ... ");
}
}
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>[email protected]</em:id>
<em:name>ZeNotes</em:name>
<em:version>0.9.0</em:version>
<em:version>0.9.1</em:version>
<em:multiprocessCompatible>true</em:multiprocessCompatible>
<em:updateURL>https://raw.githubusercontent.com/frianasoa/zenotes/main/zenote-update.json</em:updateURL>
<em:homepageURL>https://github.com/frianasoa/zenotes</em:homepageURL>
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Ze Notes",
"version": "0.9.0",
"version": "0.9.1",
"description": "Advanced notes manager",
"homepage_url": "https://github.com/frianasoa/zenotes",
"author": "Fanantenana Rianasoa Andriariniaina",
Expand Down
6 changes: 3 additions & 3 deletions zenote-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"[email protected]": {
"updates": [
{
"version": "0.9.0",
"update_link": "https://github.com/frianasoa/Ze-Notes/releases/download/v0.9.0/zenotes-v0.9.0.xpi",
"update_hash": "sha256:001441b3455fb9c59f67955ae71c00c7508fdfe118cbf370abbca082a67d6550",
"version": "0.9.1",
"update_link": "https://github.com/frianasoa/Ze-Notes/releases/download/v0.9.1/zenotes-v0.9.1.xpi",
"update_hash": "sha256:8c88681afe533be3d56e750bd6d05613326c05421c44142400e0e7977e275e22",
"applications": {
"gecko": {
"strict_min_version": "60.0"
Expand Down
6 changes: 3 additions & 3 deletions zenote-update.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<rdf:Seq>
<rdf:li>
<rdf:Description>
<ns1:version>0.9.0</ns1:version>
<ns1:version>0.9.1</ns1:version>
<ns1:targetApplication>
<rdf:Description>
<ns1:id>[email protected]</ns1:id>
<ns1:minVersion>5.0.0</ns1:minVersion>
<ns1:maxVersion>6.*</ns1:maxVersion>
<ns1:updateLink>https://github.com/frianasoa/Ze-Notes/releases/download/v0.9.0/zenotes-v0.9.0.xpi</ns1:updateLink>
<ns1:updateLink>https://github.com/frianasoa/Ze-Notes/releases/download/v0.9.1/zenotes-v0.9.1.xpi</ns1:updateLink>
</rdf:Description>
</ns1:targetApplication>

Expand All @@ -20,7 +20,7 @@
<ns1:id>[email protected]</ns1:id>
<ns1:minVersion>4.999</ns1:minVersion>
<ns1:maxVersion>6.*</ns1:maxVersion>
<ns1:updateLink>https://github.com/frianasoa/Ze-Notes/releases/download/v0.9.0/zenotes-v0.9.0.xpi</ns1:updateLink>
<ns1:updateLink>https://github.com/frianasoa/Ze-Notes/releases/download/v0.9.1/zenotes-v0.9.1.xpi</ns1:updateLink>
</rdf:Description>
</ns1:targetApplication>

Expand Down

0 comments on commit 8f40296

Please sign in to comment.