diff --git a/src/calibre/devices/cybookg3/driver.py b/src/calibre/devices/cybookg3/driver.py index 75a67b146c..0998a60451 100644 --- a/src/calibre/devices/cybookg3/driver.py +++ b/src/calibre/devices/cybookg3/driver.py @@ -7,6 +7,7 @@ Device driver for Bookeen's Cybook Gen 3 import os, shutil from itertools import cycle +from calibre.ebooks.metadata import authors_to_string from calibre.devices.errors import FreeSpaceError from calibre.devices.usbms.driver import USBMS import calibre.devices.cybookg3.t2b as t2b @@ -73,7 +74,7 @@ class CYBOOKG3(USBMS): if self.SUPPORTS_SUB_DIRS: if 'tags' in mdata.keys(): for tag in mdata['tags']: - if tag.startswith(('News')): + if tag.startswith(_('News')): newpath = os.path.join(newpath, 'news') newpath = os.path.join(newpath, mdata.get('title', '')) newpath = os.path.join(newpath, mdata.get('timestamp', '')) @@ -84,7 +85,7 @@ class CYBOOKG3(USBMS): break if newpath == path: - newpath = os.path.join(newpath, mdata.get('authors', '')) + newpath = os.path.join(newpath, authors_to_string(mdata.get('authors', ''))) newpath = os.path.join(newpath, mdata.get('title', '')) if not os.path.exists(newpath): diff --git a/src/calibre/devices/usbms/driver.py b/src/calibre/devices/usbms/driver.py index 67fbac2fa9..bf231c1ffe 100644 --- a/src/calibre/devices/usbms/driver.py +++ b/src/calibre/devices/usbms/driver.py @@ -115,7 +115,7 @@ class USBMS(Device): break if newpath == path: - newpath = os.path.join(newpath, mdata.get('authors', '')) + newpath = os.path.join(newpath, authors_to_string(mdata.get('authors', ''))) newpath = os.path.join(newpath, mdata.get('title', '')) if not os.path.exists(newpath): diff --git a/src/calibre/ebooks/mobi/reader.py b/src/calibre/ebooks/mobi/reader.py index 18663660b4..a72eb7716a 100644 --- a/src/calibre/ebooks/mobi/reader.py +++ b/src/calibre/ebooks/mobi/reader.py @@ -249,7 +249,6 @@ class MobiReader(object): pass parse_cache[htmlfile] = root self.htmlfile = htmlfile - self.log.debug('Creating OPF...') ncx = cStringIO.StringIO() opf = self.create_opf(htmlfile, guide, root) @@ -290,7 +289,6 @@ class MobiReader(object): elem.getparent().remove(elem) break break - def cleanup_html(self): self.log.debug('Cleaning up HTML...') @@ -576,5 +574,4 @@ def get_metadata(stream): except: log.exception() return mi - - +