Allow user to customize trekstor plugin to send books into sub directories. Fixes #1007646 (calibre 0.8.54 - trekstor 3.0 - subdirectories)

This commit is contained in:
Kovid Goyal 2012-06-06 10:16:11 +05:30
parent 80bb4b71b0
commit d7055c3608
2 changed files with 5 additions and 1 deletions

View File

@ -234,6 +234,8 @@ class TREKSTOR(USBMS):
VENDOR_NAME = 'TREKSTOR'
WINDOWS_MAIN_MEM = WINDOWS_CARD_A_MEM = ['EBOOK_PLAYER_7',
'EBOOK_PLAYER_5M', 'EBOOK-READER_3.0', 'EREADER_PYRUS']
SUPPORTS_SUB_DIRS = True
SUPPORTS_SUB_DIRS_DEFAULT = False
class EEEREADER(USBMS):

View File

@ -30,6 +30,8 @@ class DeviceConfig(object):
SUPPORTS_SUB_DIRS = False
SUPPORTS_SUB_DIRS_FOR_SCAN = False # This setting is used when scanning for
# books when SUPPORTS_SUB_DIRS is False
SUPPORTS_SUB_DIRS_DEFAULT = True
MUST_READ_METADATA = False
SUPPORTS_USE_AUTHOR_SORT = False
@ -57,7 +59,7 @@ class DeviceConfig(object):
c = Config('device_drivers_%s' % name, _('settings for device drivers'))
c.add_opt('format_map', default=cls.FORMATS,
help=_('Ordered list of formats the device will accept'))
c.add_opt('use_subdirs', default=True,
c.add_opt('use_subdirs', default=cls.SUPPORTS_SUB_DIRS_DEFAULT,
help=_('Place files in sub directories if the device supports them'))
c.add_opt('read_metadata', default=True,
help=_('Read metadata from files on device'))