mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[fix, plugin] Wallabag: add quiet option to callAPI() (#6252)
Dumb lazy workaround for <https://github.com/koreader/koreader/issues/6251>.
This commit is contained in:
@@ -366,7 +366,7 @@ function Wallabag:getArticleList()
|
||||
.. "&page=" .. page
|
||||
.. "&perPage=" .. self.articles_per_sync
|
||||
.. filtering
|
||||
local articles_json = self:callAPI("GET", articles_url, nil, "", "")
|
||||
local articles_json = self:callAPI("GET", articles_url, nil, "", "", true)
|
||||
|
||||
if not articles_json then
|
||||
-- we may have hit the last page, there are no more articles
|
||||
@@ -485,7 +485,7 @@ end
|
||||
-- body: empty string if not needed
|
||||
-- filepath: downloads the file if provided, returns JSON otherwise
|
||||
---- @todo separate call to internal API from the download on external server
|
||||
function Wallabag:callAPI(method, apiurl, headers, body, filepath)
|
||||
function Wallabag:callAPI(method, apiurl, headers, body, filepath, quiet)
|
||||
local request, sink = {}, {}
|
||||
local parsed
|
||||
|
||||
@@ -556,7 +556,7 @@ function Wallabag:callAPI(method, apiurl, headers, body, filepath)
|
||||
os.remove(filepath)
|
||||
logger.dbg("Wallabag: Removed failed download: ", filepath)
|
||||
end
|
||||
else
|
||||
elseif not quiet then
|
||||
UIManager:show(InfoMessage:new{
|
||||
text = _("Communication with server failed."), })
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user