From b1867def3771ee02473e6d8e0f4fcb78af1d6397 Mon Sep 17 00:00:00 2001 From: chrox Date: Wed, 15 Apr 2015 13:34:13 +0800 Subject: [PATCH 1/3] Check dns for www.example.com when geting network status Because sometimes dns won't return for www.google.com in China, ridiculous enough, right? --- frontend/ui/networkmgr.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/ui/networkmgr.lua b/frontend/ui/networkmgr.lua index 28dceeadc..81f4d578e 100644 --- a/frontend/ui/networkmgr.lua +++ b/frontend/ui/networkmgr.lua @@ -82,7 +82,7 @@ end function NetworkMgr:getWifiStatus() local socket = require("socket") - return socket.dns.toip("www.google.com") ~= nil + return socket.dns.toip("www.example.com") ~= nil end function NetworkMgr:setHTTPProxy(proxy) From fdc56f39a35f907e87ede45aad7b3b87b86926f0 Mon Sep 17 00:00:00 2001 From: chrox Date: Wed, 15 Apr 2015 13:38:01 +0800 Subject: [PATCH 2/3] Show OTA channel info when package is unavailable so that users could be aware that there is other channels to check. --- frontend/ui/otamanager.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/ui/otamanager.lua b/frontend/ui/otamanager.lua index d8874e270..f8752e30f 100644 --- a/frontend/ui/otamanager.lua +++ b/frontend/ui/otamanager.lua @@ -121,8 +121,9 @@ function OTAManager:fetchAndProcessUpdate() text = _("Your KOReader is up to date."), }) elseif ota_version == nil then + local channel = ota_channels[OTAManager:getOTAChannel()] UIManager:show(InfoMessage:new{ - text = _("OTA package is not available."), + text = T(_("OTA package is not available on %1 channel."), channel), }) elseif ota_version then UIManager:show(ConfirmBox:new{ @@ -212,7 +213,7 @@ function OTAManager:getOTAMenuTable() if NetworkMgr:getWifiStatus() == false then NetworkMgr:promptWifiOn() else - OTAManager.fetchAndProcessUpdate() + OTAManager:fetchAndProcessUpdate() end end }, From 68623854fea0c753b31b6852a0412af270eae720 Mon Sep 17 00:00:00 2001 From: chrox Date: Wed, 15 Apr 2015 13:39:28 +0800 Subject: [PATCH 3/3] Add Kindle Voyage support on libkohelper --- platform/kindle/libkohelper.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/platform/kindle/libkohelper.sh b/platform/kindle/libkohelper.sh index eb4cc383e..29cd035fd 100644 --- a/platform/kindle/libkohelper.sh +++ b/platform/kindle/libkohelper.sh @@ -22,6 +22,13 @@ case "${kmodel}" in EIPS_X_RES=16 EIPS_Y_RES=24 # Manually mesured, should be accurate. ;; + "13" | "54" | "2A" | "4F" | "52" | "53" ) + # Kindle Voyage + SCREEN_X_RES=1072 + SCREEN_Y_RES=1448 + EIPS_X_RES=16 + EIPS_Y_RES=24 # Manually mesured, should be accurate. + ;; * ) # Handle legacy devices... if [ -f "/etc/rc.d/functions" ] && grep "EIPS" "/etc/rc.d/functions" > /dev/null 2>&1 ; then