mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix splitting of authors
This commit is contained in:
parent
e773e0e13e
commit
7814dda6d8
@ -7,7 +7,6 @@ Device driver for Bookeen's Cybook Gen 3
|
|||||||
import os, shutil
|
import os, shutil
|
||||||
from itertools import cycle
|
from itertools import cycle
|
||||||
|
|
||||||
from calibre.ebooks.metadata import authors_to_string
|
|
||||||
from calibre.devices.errors import DeviceError, FreeSpaceError
|
from calibre.devices.errors import DeviceError, FreeSpaceError
|
||||||
from calibre.devices.usbms.driver import USBMS
|
from calibre.devices.usbms.driver import USBMS
|
||||||
import calibre.devices.cybookg3.t2b as t2b
|
import calibre.devices.cybookg3.t2b as t2b
|
||||||
@ -92,8 +91,8 @@ class CYBOOKG3(USBMS):
|
|||||||
break
|
break
|
||||||
|
|
||||||
if newpath == path:
|
if newpath == path:
|
||||||
newpath = os.path.join(newpath, authors_to_string(mdata.get('authors', '')))
|
newpath = os.path.join(newpath, mdata.get('authors', _('Unknown')))
|
||||||
newpath = os.path.join(newpath, mdata.get('title', ''))
|
newpath = os.path.join(newpath, mdata.get('title', _('Unknown')))
|
||||||
|
|
||||||
if not os.path.exists(newpath):
|
if not os.path.exists(newpath):
|
||||||
os.makedirs(newpath)
|
os.makedirs(newpath)
|
||||||
|
@ -124,8 +124,8 @@ class USBMS(CLI, Device):
|
|||||||
break
|
break
|
||||||
|
|
||||||
if newpath == path:
|
if newpath == path:
|
||||||
newpath = os.path.join(newpath, authors_to_string(mdata.get('authors', '')))
|
newpath = os.path.join(newpath, mdata.get('authors', _('Unknown')))
|
||||||
newpath = os.path.join(newpath, mdata.get('title', ''))
|
newpath = os.path.join(newpath, mdata.get('title', _('Unknown')))
|
||||||
|
|
||||||
if not os.path.exists(newpath):
|
if not os.path.exists(newpath):
|
||||||
os.makedirs(newpath)
|
os.makedirs(newpath)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user