mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Add books dialog: Exclude zip and rar files from the default list of books types. These are rarely single books these days. And they can still be selected using the archives option. Fixes #1602 (Allows you to default to exclude some file types when adding books)
This commit is contained in:
parent
528efd3d88
commit
894f7d547a
@ -30,8 +30,9 @@ from polyglot.builtins import iteritems, string_or_bytes
|
||||
|
||||
|
||||
def get_filters():
|
||||
archives = ['zip', 'rar']
|
||||
return [
|
||||
(_('Books'), BOOK_EXTENSIONS),
|
||||
(_('Books'), [x for x in BOOK_EXTENSIONS if x not in archives]),
|
||||
(_('EPUB books'), ['epub', 'kepub']),
|
||||
(_('Kindle books'), ['mobi', 'prc', 'azw', 'azw3', 'kfx', 'tpz', 'azw1', 'azw4']),
|
||||
(_('PDF books'), ['pdf', 'azw4']),
|
||||
@ -39,7 +40,7 @@ def get_filters():
|
||||
(_('LIT books'), ['lit']),
|
||||
(_('Text books'), ['txt', 'text', 'rtf', 'md', 'markdown', 'textile', 'txtz']),
|
||||
(_('Comics'), ['cbz', 'cbr', 'cbc']),
|
||||
(_('Archives'), ['zip', 'rar']),
|
||||
(_('Archives'), archives),
|
||||
(_('Wordprocessor files'), ['odt', 'doc', 'docx']),
|
||||
]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user