mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #4690 (Error while sending book with non-ascii character in title/author to device)
This commit is contained in:
parent
e87c1cc343
commit
c3cba391b7
@ -808,6 +808,8 @@ class Device(DeviceConfig, DevicePlugin):
|
|||||||
ext = os.path.splitext(fname)[1]
|
ext = os.path.splitext(fname)[1]
|
||||||
|
|
||||||
from calibre.library.save_to_disk import get_components
|
from calibre.library.save_to_disk import get_components
|
||||||
|
if not isinstance(template, unicode):
|
||||||
|
template = template.decode('utf-8')
|
||||||
extra_components = get_components(template, mdata, fname)
|
extra_components = get_components(template, mdata, fname)
|
||||||
if not extra_components:
|
if not extra_components:
|
||||||
extra_components.append(sanitize(self.filename_callback(fname,
|
extra_components.append(sanitize(self.filename_callback(fname,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user