2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00

Merge pull request #945 from evgsh/opds

opds / Added acquisition relation types , fixes issue #940
This commit is contained in:
Huang Xin 2014-10-03 22:42:29 +08:00
commit 105764fd77

View File

@ -40,7 +40,7 @@ local OPDSBrowser = Menu:extend{
catalog_type = "application/atom%+xml",
search_type = "application/opensearchdescription%+xml",
acquisition_rel = "http://opds-spec.org/acquisition",
acquisition_rel = "^http://opds%-spec%.org/acquisition",
thumbnail_rel = "http://opds-spec.org/image/thumbnail",
formats = {
@ -331,7 +331,7 @@ function OPDSBrowser:genItemTableFromURL(item_url, base_url)
if link.type:find(self.catalog_type) then
item.url = build_href(link.href)
end
if link.rel == self.acquisition_rel then
if link.rel and link.rel:match(self.acquisition_rel) then
table.insert(item.acquisitions, {
type = link.type,
href = build_href(link.href),