mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 08:21:39 -06:00
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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user