mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 05:53:10 +02:00
...
This commit is contained in:
parent
8367f875a5
commit
219feadc1e
1 changed files with 5 additions and 2 deletions
|
|
@ -124,12 +124,15 @@ class PDNOVEL_KOBO(PDNOVEL):
|
|||
|
||||
BCD = [0x222]
|
||||
|
||||
EBOOK_DIR_MAIN = 'eBooks/Kobo'
|
||||
EBOOK_DIR_MAIN = 'eBooks'
|
||||
|
||||
def upload_cover(self, path, filename, metadata, filepath):
|
||||
coverdata = getattr(metadata, 'thumbnail', None)
|
||||
if coverdata and coverdata[2]:
|
||||
with open(os.path.join(path, '.thumbnail', filename+'.jpg'), 'wb') as coverfile:
|
||||
dirpath = os.path.join(path, '.thumbnail')
|
||||
if not os.path.exists(dirpath):
|
||||
os.makedirs(dirpath)
|
||||
with open(os.path.join(dirpath, filename+'.jpg'), 'wb') as coverfile:
|
||||
coverfile.write(coverdata[2])
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue