mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Merge pull request #855 from WS64/master
Only use registered file types in search
This commit is contained in:
@@ -333,25 +333,26 @@ function Search:find(option)
|
||||
self.browse_tags[string.sub(j,2)] = (self.browse_tags[string.sub(j,2)] or 0) + 1
|
||||
end
|
||||
end
|
||||
|
||||
if upsearch ~= "" then
|
||||
if string.find(dummy,upsearch,nil,true) then
|
||||
i = i + 1
|
||||
end
|
||||
else
|
||||
if option == "series" then
|
||||
if self.browse_series[self.data[i][self.series]] then
|
||||
if DocumentRegistry:getProvider(self.data[i][self.path]) then
|
||||
if upsearch ~= "" then
|
||||
if string.find(dummy,upsearch,nil,true) then
|
||||
i = i + 1
|
||||
end
|
||||
elseif option == "tags" then
|
||||
local found = false
|
||||
for j in string.gmatch(self.data[i][self.tags3],"\t[^\t]+") do
|
||||
if j~="\t" and self.browse_tags[string.sub(j,2)] then
|
||||
found = true
|
||||
else
|
||||
if option == "series" then
|
||||
if self.browse_series[self.data[i][self.series]] then
|
||||
i = i + 1
|
||||
end
|
||||
elseif option == "tags" then
|
||||
local found = false
|
||||
for j in string.gmatch(self.data[i][self.tags3],"\t[^\t]+") do
|
||||
if j~="\t" and self.browse_tags[string.sub(j,2)] then
|
||||
found = true
|
||||
end
|
||||
end
|
||||
if found then
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
if found then
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user