mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
JetBook driver: Only use JetBook naming scheme for txt, pdf and fb2 files. Fixes #6638 (Improve the naming scheme for Aluratek Libre (and perhaps Jetbook))
This commit is contained in:
parent
f4adce1a95
commit
4e73c44092
@ -50,6 +50,8 @@ class JETBOOK(USBMS):
|
||||
|
||||
def filename_callback(self, fname, mi):
|
||||
fileext = os.path.splitext(os.path.basename(fname))[1]
|
||||
if fileext.lower() not in ('txt', 'pdf', 'fb2'):
|
||||
return fname
|
||||
title = mi.title if mi.title else 'Unknown'
|
||||
title = title.replace(' ', '_')
|
||||
au = mi.format_authors()
|
||||
|
Loading…
x
Reference in New Issue
Block a user