1) More changes for connect-time syncing.

2) some changes to the Boox driver
This commit is contained in:
Charles Haley 2010-07-05 14:48:51 +01:00
parent 55ff5e7de2
commit 25905711fb
3 changed files with 15 additions and 10 deletions

View File

@ -119,22 +119,25 @@ class BOOX(HANLINV3):
MAIN_MEMORY_VOLUME_LABEL = 'BOOX Internal Memory'
STORAGE_CARD_VOLUME_LABEL = 'BOOX Storage Card'
EBOOK_DIR_MAIN = ['MyBooks']
EXTRA_CUSTOMIZATION_MESSAGE = _('Comma separated list of directories to '
'send e-books to on the device. The first one that exists will '
'be used.')
EBOOK_DIR_MAIN = ['MyBooks', 'MyBooks']
EXTRA_CUSTOMIZATION_MESSAGE = _('Directories to send e-books to on the device. '
'The first directory is used for main memory. '
'The second is used for cards.')
EXTRA_CUSTOMIZATION_DEFAULT = ', '.join(EBOOK_DIR_MAIN)
# EBOOK_DIR_CARD_A = 'MyBooks' ## Am quite sure we need this.
def post_open_callback(self):
opts = self.settings()
dirs = opts.extra_customization
if not dirs:
dirs = self.EBOOK_DIR_MAIN
else:
# will have at least one item ...
dirs = [x.strip() for x in dirs.split(',')]
self.EBOOK_DIR_MAIN = dirs
self.EBOOK_DIR_MAIN = dirs[0]
if len(dirs) > 1:
self.EBOOK_DIR_CARD_A = self.EBOOK_DIR_CARD_B = dirs[1]
else:
self.EBOOK_DIR_CARD_A = self.EBOOK_DIR_CARD_B = dirs[0]
def windows_sort_drives(self, drives):
return drives

View File

@ -58,7 +58,7 @@ class USBMS(CLI, Device):
debug_print ('USBMS: Fetching list of books from device. oncard=', oncard)
dummy_bl = booklist_class(None, None, None)
dummy_bl = self.booklist_class(None, None, None)
if oncard == 'carda' and not self._card_a_prefix:
self.report_progress(1.0, _('Getting list of books on device...'))
@ -78,6 +78,8 @@ class USBMS(CLI, Device):
self.EBOOK_DIR_CARD_B if oncard == 'cardb' else \
self.get_main_ebook_dir()
debug_print ('USBMS: dirs are:', prefix, ebook_dirs)
# get the metadata cache
bl = self.booklist_class(oncard, prefix, self.settings)
need_sync = self.parse_metadata_cache(bl, prefix, self.METADATA_CACHE)

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>588</width>
<width>599</width>
<height>516</height>
</rect>
</property>
@ -200,7 +200,7 @@ Title match ignores leading indefinite articles (&quot;the&quot;, &quot;a&quot;,
<item>
<widget class="QLabel" name="label_41">
<property name="text">
<string>Choose 'Manual Management', to have Calibre update the metadata cache (not the book) and add collections when a book is sent. With this option, calibre will never remove a collection. Choose 'Calibre manages metadata when sending books' to have Calibre update the metadata cache and add/remove collections when you send a book to the device. Choose 'Calibre manages metadata when device is connected' to have Calibre update the metadata cache and add/remove collections when you connect the device. </string>
<string>Choose 'Manual Management', to have Calibre update the metadata cache (not the book) and add collections when a book is sent. With this option, calibre will never remove a collection. Choose 'Calibre manages metadata when sending books' to have Calibre update the metadata cache and add/remove collections for a book when it is sent to the device. Choose 'Calibre manages metadata when device is connected' to have Calibre update the metadata cache and add/remove collections when calibre connects to the device and when you send a book. </string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>