fix(kobo): strip leading v from server version in koreader plugin

The KOReader plugin's update check response provides the server version,
which already contains a leading "v". The update and plugin popups in
the KOReader plugin format the version with an explicit "v" prefix,
resulting in a "vv" typo (e.g. "vv1.2.0").

Strip the leading "v" from the server version in the updater script
if present to ensure it is displayed with a single "v" prefix.

Closes #644
This commit is contained in:
neon
2026-07-11 17:02:32 +00:00
parent fd05156186
commit 568bf9dd6f
2 changed files with 9 additions and 1 deletions
@@ -211,7 +211,7 @@ function UpdateCheck:doCheckForUpdate()
end
function UpdateCheck:handleUpdateVersionResponse(body, interactive, prompt_allowed)
local server_ver = body.serverVersion or "unknown"
local server_ver = tostring(body.serverVersion or "unknown"):gsub("^v", "")
local plugin_latest = body.pluginVersion
self.settings.update_check_last_at = os.time()