mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
@@ -118,11 +118,6 @@ function Calibre:addToMainMenu(menu_items)
|
||||
keep_menu_open = true,
|
||||
sub_item_table = self:getWirelessMenuTable(),
|
||||
},
|
||||
{
|
||||
text = _("JSON parser"),
|
||||
keep_menu_open = true,
|
||||
sub_item_table = self:getParserMenuTable(),
|
||||
},
|
||||
}
|
||||
}
|
||||
-- insert the metadata search
|
||||
@@ -419,50 +414,4 @@ function Calibre:getWirelessMenuTable()
|
||||
return t
|
||||
end
|
||||
|
||||
function Calibre:getParserMenuTable()
|
||||
return {
|
||||
{
|
||||
text = _("Automatic"),
|
||||
help_text = _("The program will decide based on the size of the JSON file. Recommended"),
|
||||
checked_func = function()
|
||||
return G_reader_settings:hasNot("calibre_json_parser")
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:delSetting("calibre_json_parser")
|
||||
end,
|
||||
},
|
||||
{
|
||||
text = _("Fast"),
|
||||
help_text = _("Faster parsing, but may not take too kindly to malformed input files"),
|
||||
checked_func = function()
|
||||
return G_reader_settings:readSetting("calibre_json_parser") == "fast"
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:saveSetting("calibre_json_parser", "fast")
|
||||
end,
|
||||
},
|
||||
{
|
||||
text = _("Safe"),
|
||||
help_text = _("Slower, but safer. Useful if you're experiencing problems with the other modes"),
|
||||
checked_func = function()
|
||||
return G_reader_settings:readSetting("calibre_json_parser") == "safe"
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:saveSetting("calibre_json_parser", "safe")
|
||||
end,
|
||||
},
|
||||
{
|
||||
text = _("Legacy"),
|
||||
help_text = _("Fast, but requires more RAM, only recommended on modest library sizes (or beefier devices)"),
|
||||
checked_func = function()
|
||||
return G_reader_settings:readSetting("calibre_json_parser") == "legacy"
|
||||
end,
|
||||
callback = function()
|
||||
G_reader_settings:saveSetting("calibre_json_parser", "legacy")
|
||||
end,
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
return Calibre
|
||||
|
||||
Reference in New Issue
Block a user