View Single Post
Old 07-20-2013, 07:54 AM   #208
chrox
Zealot
chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.chrox ought to be getting tired of karma fortunes by now.
 
Posts: 144
Karma: 405567
Join Date: Nov 2012
Device: K3 KPW PB840
Quote:
Originally Posted by mmjoshi View Post
This works perfectly when the pdf files are in the documents folder. However, when I add pdf files through Calibre, they typically get added in a subdirectory. In that case this code does not work. Can this code be modified for such an scenario? Ideally I would like to put all my pdf, epub, djvu files in a single folder say "Non Kindle Formats" from where KOReader can pick them up.

I use a Kindle Touch.

mj
How about changing this in koreader/reader.lua at around line 164:
Code:
file_filter = function(filename)
	if DocumentRegistry:getProvider(filename) then
		return true
	end
end
into this:
Code:
file_filter = function(filename)
	if filename:match("%.pdf$") or filename:match("%.epub$") 
	  or filename:match("%.djvu$") then
		return true
	end
end

Last edited by chrox; 07-20-2013 at 07:58 AM.
chrox is offline   Reply With Quote