Book metadata archive: fix saving (#15445)

This commit is contained in:
hius07 authored and GitHub committed 2026-05-27 09:59:14 +03:00
1 parent 82ac90db76
commit 7ea3a7b668
3 files changed
+7 -2

No files matched your search

+5 -2
View File
@@ -1142,8 +1142,11 @@ function FileManager:showDeleteFileDialog(filepath, post_delete_callback, pre_de
end
end,
}
if not is_file or BookList.hasBookBeenOpened(file) then
self.addMetadataArcCheckButton(confirmbox)
if is_file then
local doc_settings = BookList.hasBookBeenOpened(file) and BookList.getDocSettings(file)
if doc_settings and doc_settings:has("doc_props") and doc_settings:has("partial_md5_checksum") then
self.addMetadataArcCheckButton(confirmbox)
end
end
UIManager:show(confirmbox)
end
@@ -762,6 +762,7 @@ function BookInfo:editSummary(doc_settings_or_file, book_props)
local note = input_dialog:getInputText()
summary.note = note ~= "" and note or nil
doc_settings_or_file = filemanagerutil.saveSummary(doc_settings_or_file, summary)
BookList.setBookInfoCacheProperty(doc_settings_or_file:readSetting("doc_path"), "been_opened", true)
self.summary_updated = true
self.kvp_widget:onClose()
self:show(doc_settings_or_file, book_props)
+1
View File
@@ -624,6 +624,7 @@ function DocSettings.saveSettingsArcFile(doc_settings, custom_metadata_file, on_
end
custom_metadata_file = DocSettings:findCustomMetadataFile(doc_settings:readSetting("doc_path"))
end
if doc_settings:hasNot("doc_props") or doc_settings:hasNot("partial_md5_checksum") then return end
local arc_file = DocSettings.getSettingsArcFile(doc_settings:readSetting("partial_md5_checksum"))
if not on_closing then -- on deletion, called by DocSettings.updateLocation()
if G_reader_settings:hasNot("document_metadata_arc_on_deletion") then