Added acquisition relation types , fixes issue #940

pull/945/head
evgsh 10 years ago
parent 8fda638da6
commit aae2c4de27

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

Loading…
Cancel
Save