From ad7dc86a43e33ed959acafdf637ba4ddc9bcb1a2 Mon Sep 17 00:00:00 2001 From: poire-z Date: Wed, 13 Mar 2019 19:05:50 +0100 Subject: [PATCH] CoverBrowser: fix a few "Extract and cache" issues Ignore path and cover specs when last invoked menu was History. Fix InfoMessage size, broken by InfoMessage auto resize. --- plugins/coverbrowser.koplugin/bookinfomanager.lua | 1 + plugins/coverbrowser.koplugin/covermenu.lua | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/coverbrowser.koplugin/bookinfomanager.lua b/plugins/coverbrowser.koplugin/bookinfomanager.lua index f1773f3be..44b8e170d 100644 --- a/plugins/coverbrowser.koplugin/bookinfomanager.lua +++ b/plugins/coverbrowser.koplugin/bookinfomanager.lua @@ -849,6 +849,7 @@ Do you want to prune cache of removed books?]] }, text_widget }) + info.movable[1][1]._size = nil -- reset HorizontalGroup size info.movable:setMovedOffset(orig_moved_offset) info:paintTo(Screen.bb, 0,0) local d = info.movable[1].dimen diff --git a/plugins/coverbrowser.koplugin/covermenu.lua b/plugins/coverbrowser.koplugin/covermenu.lua index d65b70bba..e9d5d9e54 100644 --- a/plugins/coverbrowser.koplugin/covermenu.lua +++ b/plugins/coverbrowser.koplugin/covermenu.lua @@ -81,8 +81,13 @@ function CoverMenu:updateItems(select_number) self:_updateItemsBuildUI() -- Set the local variables with the things we know - current_path = self.path - current_cover_specs = self.cover_specs + -- These are used only by extractBooksInDirectory(), which should + -- use the cover_specs set for FileBrowser, and not those from History. + -- Hopefully, we get self.path=nil when called fro History + if self.path then + current_path = self.path + current_cover_specs = self.cover_specs + end -- As done in Menu:updateItems() self:updatePageInfo(select_number)