Exporter: fix export My Clippings (#14636)

This commit is contained in:
hius07
2025-11-18 08:38:36 +02:00
committed by GitHub
parent 7a6c4db693
commit 69bd22b4bf
2 changed files with 5 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ local function format(booknotes, settings)
entries = {},
exported = booknotes.exported,
file = booknotes.file,
md5sum = settings.bookChecksum and md5.sumFile(booknotes.file) or nil,
md5sum = settings.bookChecksum and booknotes.file and md5.sumFile(booknotes.file) or nil,
number_of_pages = booknotes.number_of_pages
}
for _, entry in ipairs(booknotes) do

View File

@@ -192,8 +192,10 @@ function XMNoteExporter:export(t)
if not self:isReadyToExport() then return false end
for _, booknotes in ipairs(t) do
local ok = self:createHighlights(booknotes)
if not ok then return false end
if booknotes.file then
local ok = self:createHighlights(booknotes)
if not ok then return false end
end
end
return true
end