mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
@@ -279,6 +279,7 @@ function OPDSBrowser:fetchFeed(item_url, headers_only)
|
||||
text = text,
|
||||
icon = icon,
|
||||
})
|
||||
logger.dbg(string.format("OPDS: Failed to fetch catalog `%s`: %s", item_url, text))
|
||||
end
|
||||
|
||||
-- Parses feed to catalog
|
||||
@@ -353,6 +354,7 @@ function OPDSBrowser:genItemTableFromCatalog(catalog, item_url)
|
||||
hrefs[link.rel] = build_href(link.href)
|
||||
end
|
||||
end
|
||||
-- OpenSearch
|
||||
if link.type:find(self.search_type) then
|
||||
if link.href then
|
||||
table.insert(item_table, { -- the first item in each subcatalog
|
||||
@@ -362,6 +364,16 @@ function OPDSBrowser:genItemTableFromCatalog(catalog, item_url)
|
||||
})
|
||||
end
|
||||
end
|
||||
-- Calibre search
|
||||
if link.type:find(self.search_template_type) and link.rel and link.rel:find("search") then
|
||||
if link.href then
|
||||
table.insert(item_table, {
|
||||
text = "\u{f002} " .. _("Search"),
|
||||
url = build_href(link.href:gsub("{searchTerms}", "%%s")),
|
||||
searchable = true,
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user