Merge pull request #2324 from koreader/houqp-master

update new OTA server & fix plugin check errors
pull/2334/head
Frans de Jonge 8 years ago committed by GitHub
commit b7671e9ae5

@ -8,6 +8,7 @@ globals = {
}
read_globals = {
"_ENV",
"ANDROID_FONT_DIR",
"KOBO_TOUCH_MIRRORED",
"KOBO_SYNC_BRIGHTNESS_WITH_NICKEL",

@ -359,7 +359,7 @@ po:
static-check:
@if which luacheck > /dev/null; then \
luacheck -q frontend; \
luacheck -q frontend plugins; \
else \
echo "[!] luacheck not found. "\
"you can install it with 'luarocks install luacheck'"; \

@ -13,6 +13,7 @@ local ota_dir = DataStorage:getDataDir() .. "/ota/"
local OTAManager = {
ota_servers = {
"http://ota.koreader.rocks:80/",
"http://vislab.bjmu.edu.cn:80/apps/koreader/ota/",
"http://koreader-eu.ak-team.com:80/",
"http://koreader-af.ak-team.com:80/",
@ -37,7 +38,11 @@ local ota_channels = {
function OTAManager:getOTAModel()
if Device:isKindle() then
return "kindle"
if Device:isTouchDevice() then
return "kindle"
else
return "kindle-legacy"
end
elseif Device:isKobo() then
return "kobo"
elseif Device:isPocketBook() then

@ -57,7 +57,7 @@ function MyClipping:parseMyClippings()
}
elseif index == 2 then
info = self:getInfo(line)
elseif index == 3 then
-- elseif index == 3 then
-- should be a blank line, we skip this line
elseif index == 4 then
text = self:getText(line)
@ -168,8 +168,10 @@ function MyClipping:getTime(line)
local _, _, hour, minute, second = line:find("(%d+):(%d+):(%d+)")
if year and month and day and hour and minute and second then
for k, v in pairs(pms) do
if line:find(k) then hour = hour + v end
break
if line:find(k) then
hour = hour + v
break
end
end
local time = os.time({
year = year, month = month, day = day,

@ -74,6 +74,7 @@ end
function slt2.get_dependency(template, start_tag, end_tag)
return stable_uniq(include_fold(template, start_tag, end_tag, function(acc, v, name)
if type(v) == 'string' then
return acc
elseif type(v) == 'table' then
if name ~= nil then
table.insert(acc, name)

@ -125,13 +125,13 @@ function ReaderStatistics:updateSettings()
text = "",
input_type = "number",
hint = T(_("Min seconds, default is 5. Current value: %1"),
self.page_min_read_sec),
self.page_min_read_sec),
},
{
text = "",
input_type = "number",
hint = T(_("Max seconds, default is 90. Current value: %1"),
self.page_max_read_sec),
self.page_max_read_sec),
},
},
buttons = {

Loading…
Cancel
Save