|
|
|
@ -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
|
|
|
|
|