mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Even more directory to folder (#7387)
Cf. https://github.com/koreader/koreader/pull/7386#issuecomment-791555451
This commit is contained in:
@@ -533,7 +533,7 @@ function OPDSBrowser.getCurrentDownloadDir()
|
||||
end
|
||||
|
||||
function OPDSBrowser:downloadFile(item, filetype, remote_url)
|
||||
-- download to user selected directory or last opened dir
|
||||
-- Download to user selected folder or last opened folder.
|
||||
local download_dir = self.getCurrentDownloadDir()
|
||||
local filename = util.getSafeFilename(item.author .. " - " .. item.title .. "." .. filetype, download_dir)
|
||||
local local_path = download_dir .. "/" .. filename
|
||||
@@ -650,14 +650,14 @@ function OPDSBrowser:showDownloads(item)
|
||||
table.insert(buttons, line)
|
||||
end
|
||||
table.insert(buttons, {})
|
||||
-- set download directory button
|
||||
-- Set download folder button.
|
||||
table.insert(buttons, {
|
||||
{
|
||||
text = _("Select another directory"),
|
||||
text = _("Select another folder"),
|
||||
callback = function()
|
||||
require("ui/downloadmgr"):new{
|
||||
onConfirm = function(path)
|
||||
logger.info("Download directory set to", path)
|
||||
logger.info("Download folder set to", path)
|
||||
G_reader_settings:saveSetting("download_dir", path)
|
||||
UIManager:nextTick(function()
|
||||
UIManager:close(self.download_dialog)
|
||||
|
||||
Reference in New Issue
Block a user