View Single Post
Old 07-23-2013, 04:54 AM   #213
Markismus
Guru
Markismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicingMarkismus causes much rejoicing
 
Markismus's Avatar
 
Posts: 955
Karma: 149907
Join Date: Jul 2013
Location: Rotterdam
Device: HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
Quote:
Originally Posted by richy1989 View Post
Is there any way to add a filter with the File Manager?
I have too many books,
but I just want to view the 'pdf' documents with koreader.
You don't have to edit filechooser.lua. In koreader there already is an implementation for choosing what extensions to use.

In koreader/frontend/document your will find three scripts:
pdfdocument.lua for pdf-files,
djvudocument.lua for dvju-files,
credocument.lua for all other handled files.

At the end of each file you have lines such as:
DocumentRegistry:addProvider("txt", "application/txt", CreDocument)

Comment out those extensions you do not want to see by prefixing "--" or add lines for new extensions, e.g.:
DocumentRegistry:addProvider("lua", "application/txt", CreDocument)

In the case of showing only pdf- and epub-files comment out the DocumentRegistry in dvjudocument.lua and all lines but one in credocument.lua.
Markismus is offline   Reply With Quote