View Single Post
Old 10-02-2014, 09:50 AM   #574
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by hius07 View Post
OPDS again.
I see that fb2 format has been added in the latest nightly build to the opds section here:
https://github.com/koreader/koreader...rowser.lua#L48

Unfortunately, still cannot download books in .fb2.zip from:
http://flibusta.net/opds
http://coollib.net/opds
This patch for frontend/ui/widget/opdsbrowser.lua should fix it (URL with rel="http://opds-spec.org/acquisition/open-access" will be recognized as an acquisition URL).
Code:
--- opdsbrowser.lua	2014-10-02 13:38:25.000000000 +0000
+++ opdsbrowser.patched.lua	2014-10-02 13:39:35.000000000 +0000
@@ -40,7 +40,7 @@
 
     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 @@
                         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),
BTW, these sites are using two link nodes with rel="http://opds-spec.org/thumbnail" and rel="http://opds-spec.org/image" for the same cover image and these rels aren't recognized by KOReader (though it's not fatal, now images aren't displayed even for recognized rels).
eureka is offline   Reply With Quote