mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
1) More changes for connect-time syncing.
2) some changes to the Boox driver
This commit is contained in:
parent
55ff5e7de2
commit
25905711fb
@ -119,22 +119,25 @@ class BOOX(HANLINV3):
|
|||||||
MAIN_MEMORY_VOLUME_LABEL = 'BOOX Internal Memory'
|
MAIN_MEMORY_VOLUME_LABEL = 'BOOX Internal Memory'
|
||||||
STORAGE_CARD_VOLUME_LABEL = 'BOOX Storage Card'
|
STORAGE_CARD_VOLUME_LABEL = 'BOOX Storage Card'
|
||||||
|
|
||||||
EBOOK_DIR_MAIN = ['MyBooks']
|
EBOOK_DIR_MAIN = ['MyBooks', 'MyBooks']
|
||||||
EXTRA_CUSTOMIZATION_MESSAGE = _('Comma separated list of directories to '
|
EXTRA_CUSTOMIZATION_MESSAGE = _('Directories to send e-books to on the device. '
|
||||||
'send e-books to on the device. The first one that exists will '
|
'The first directory is used for main memory. '
|
||||||
'be used.')
|
'The second is used for cards.')
|
||||||
EXTRA_CUSTOMIZATION_DEFAULT = ', '.join(EBOOK_DIR_MAIN)
|
EXTRA_CUSTOMIZATION_DEFAULT = ', '.join(EBOOK_DIR_MAIN)
|
||||||
|
|
||||||
# EBOOK_DIR_CARD_A = 'MyBooks' ## Am quite sure we need this.
|
|
||||||
|
|
||||||
def post_open_callback(self):
|
def post_open_callback(self):
|
||||||
opts = self.settings()
|
opts = self.settings()
|
||||||
dirs = opts.extra_customization
|
dirs = opts.extra_customization
|
||||||
if not dirs:
|
if not dirs:
|
||||||
dirs = self.EBOOK_DIR_MAIN
|
dirs = self.EBOOK_DIR_MAIN
|
||||||
else:
|
else:
|
||||||
|
# will have at least one item ...
|
||||||
dirs = [x.strip() for x in dirs.split(',')]
|
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):
|
def windows_sort_drives(self, drives):
|
||||||
return drives
|
return drives
|
||||||
|
@ -58,7 +58,7 @@ class USBMS(CLI, Device):
|
|||||||
|
|
||||||
debug_print ('USBMS: Fetching list of books from device. oncard=', oncard)
|
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:
|
if oncard == 'carda' and not self._card_a_prefix:
|
||||||
self.report_progress(1.0, _('Getting list of books on device...'))
|
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.EBOOK_DIR_CARD_B if oncard == 'cardb' else \
|
||||||
self.get_main_ebook_dir()
|
self.get_main_ebook_dir()
|
||||||
|
|
||||||
|
debug_print ('USBMS: dirs are:', prefix, ebook_dirs)
|
||||||
|
|
||||||
# get the metadata cache
|
# get the metadata cache
|
||||||
bl = self.booklist_class(oncard, prefix, self.settings)
|
bl = self.booklist_class(oncard, prefix, self.settings)
|
||||||
need_sync = self.parse_metadata_cache(bl, prefix, self.METADATA_CACHE)
|
need_sync = self.parse_metadata_cache(bl, prefix, self.METADATA_CACHE)
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>588</width>
|
<width>599</width>
|
||||||
<height>516</height>
|
<height>516</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -200,7 +200,7 @@ Title match ignores leading indefinite articles ("the", "a",
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_41">
|
<widget class="QLabel" name="label_41">
|
||||||
<property name="text">
|
<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>
|
||||||
<property name="textFormat">
|
<property name="textFormat">
|
||||||
<enum>Qt::PlainText</enum>
|
<enum>Qt::PlainText</enum>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user