mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[feat] DocumentRegistry: add getProviders() and preferred by weight (#3651)
This is step one toward "open with". References https://github.com/koreader/koreader/issues/3345 * Fix up some mimetypes * Add XHTML to supported filetypes * Add a few image files to MuPDF * ".bmp", * ".gif", * ".hdp", * ".j2k", * ".jp2", * ".jpeg", * ".jpg", * ".jpx", * ".jxr", * ".pam", * ".pbm", * ".pgm", * ".png", * ".pnm", * ".ppm", * ".tif", * ".tiff", * ".wdp",
This commit is contained in:
@@ -12,6 +12,7 @@ local DjvuDocument = Document:new{
|
||||
options = KoptOptions,
|
||||
koptinterface = nil,
|
||||
color_bb_type = Blitbuffer.TYPE_BBRGB24,
|
||||
provider_name = "DjVu Libre",
|
||||
}
|
||||
|
||||
-- check DjVu magic string to validate
|
||||
@@ -136,8 +137,8 @@ function DjvuDocument:drawPage(target, x, y, rect, pageno, zoom, rotation, gamma
|
||||
end
|
||||
|
||||
function DjvuDocument:register(registry)
|
||||
registry:addProvider("djvu", "application/djvu", self)
|
||||
registry:addProvider("djv", "application/djvu", self)
|
||||
registry:addProvider("djv", "image/vnd.djvu", self, 100)
|
||||
registry:addProvider("djvu", "image/vnd.djvu", self, 100)
|
||||
end
|
||||
|
||||
return DjvuDocument
|
||||
|
||||
Reference in New Issue
Block a user