mirror of
https://github.com/koreader/koreader.git
synced 2025-12-24 12:14:05 +01:00
[fix] DocumentRegistry: don't create empty sdr and add hasProvider() (#3675)
As suggested by @poire-z https://github.com/koreader/koreader/pull/3653#issuecomment-364663156
This commit is contained in:
@@ -104,14 +104,14 @@ function DropBoxApi:listFolder(path, token)
|
||||
table.insert(dropbox_list, {
|
||||
text = text,
|
||||
url = files.path_display,
|
||||
type = tag
|
||||
type = tag,
|
||||
})
|
||||
--show only file with supported formats
|
||||
elseif tag == "file" and DocumentRegistry:getProvider(text) then
|
||||
elseif tag == "file" and DocumentRegistry:hasProvider(text) then
|
||||
table.insert(dropbox_file, {
|
||||
text = text,
|
||||
url = files.path_display,
|
||||
type = tag
|
||||
type = tag,
|
||||
})
|
||||
end
|
||||
end
|
||||
@@ -126,7 +126,7 @@ function DropBoxApi:listFolder(path, token)
|
||||
table.insert(dropbox_list, {
|
||||
text = files.text,
|
||||
url = files.url,
|
||||
type = files.type
|
||||
type = files.type,
|
||||
})
|
||||
end
|
||||
return dropbox_list
|
||||
|
||||
Reference in New Issue
Block a user