mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Detect .azw3 files on Kindle devices
This commit is contained in:
parent
8d3c9d93b3
commit
340a87fab6
@ -325,6 +325,10 @@ class KINDLE2(KINDLE):
|
||||
OPT_APNX_ACCURATE = 1
|
||||
OPT_APNX_CUST_COL = 2
|
||||
|
||||
def formats_to_scan_for(self):
|
||||
ans = USBMS.formats_to_scan_for(self) | {'azw3'}
|
||||
return ans
|
||||
|
||||
def books(self, oncard=None, end_session=True):
|
||||
bl = USBMS.books(self, oncard=oncard, end_session=end_session)
|
||||
# Read collections information
|
||||
|
@ -128,6 +128,9 @@ class USBMS(CLI, Device):
|
||||
elif location_code == 'B':
|
||||
self._update_driveinfo_file(self._card_b_prefix, location_code, name)
|
||||
|
||||
def formats_to_scan_for(self):
|
||||
return set(self.settings().format_map) | set(self.FORMATS)
|
||||
|
||||
def books(self, oncard=None, end_session=True):
|
||||
from calibre.ebooks.metadata.meta import path_to_ext
|
||||
|
||||
@ -166,7 +169,7 @@ class USBMS(CLI, Device):
|
||||
for idx,b in enumerate(bl):
|
||||
bl_cache[b.lpath] = idx
|
||||
|
||||
all_formats = set(self.settings().format_map) | set(self.FORMATS)
|
||||
all_formats = self.formats_to_scan_for()
|
||||
|
||||
def update_booklist(filename, path, prefix):
|
||||
changed = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user