mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
745ee3d242
commit
45de2bde56
@ -11,7 +11,7 @@ __docformat__ = 'restructuredtext en'
|
||||
Device driver for the SONY T1 devices
|
||||
'''
|
||||
|
||||
import os, time, calendar, re
|
||||
import os, time, re
|
||||
import sqlite3 as sqlite
|
||||
from contextlib import closing
|
||||
|
||||
@ -19,6 +19,7 @@ from calibre.devices.usbms.driver import USBMS, debug_print
|
||||
from calibre.devices.usbms.device import USBDevice
|
||||
from calibre.devices.usbms.books import CollectionsBookList
|
||||
from calibre.devices.usbms.books import BookList
|
||||
from calibre.ebooks.metadata import authors_to_sort_string
|
||||
from calibre.constants import islinux
|
||||
|
||||
DBPATH = 'Sony_Reader/database/books.db'
|
||||
@ -261,7 +262,7 @@ class PRST1(USBMS):
|
||||
lpath = book.lpath
|
||||
try:
|
||||
if opts.use_author_sort:
|
||||
if newmi.author_sort :
|
||||
if newmi.author_sort:
|
||||
author = newmi.author_sort
|
||||
else:
|
||||
author = authors_to_sort_string(newmi.authors)
|
||||
@ -449,7 +450,7 @@ class PRST1(USBMS):
|
||||
|
||||
cursor.close()
|
||||
|
||||
if metadata.bookId is not None:
|
||||
if getattr(metadata, 'bookId', None) is not None:
|
||||
debug_print('PRS-T1: refreshing cover for book being sent')
|
||||
self.upload_book_cover(connection, metadata, source_id)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user