From ab4562c0e6ced333056b98321b92ac0e2f39877d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 1 Nov 2011 08:56:48 +0530 Subject: [PATCH] T1 driver: Workaround for T1 showing error messages when opening some news downloads on the device --- src/calibre/devices/prst1/driver.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/calibre/devices/prst1/driver.py b/src/calibre/devices/prst1/driver.py index 342a32bb37..737371e245 100644 --- a/src/calibre/devices/prst1/driver.py +++ b/src/calibre/devices/prst1/driver.py @@ -560,14 +560,21 @@ class PRST1(USBMS): cursor = connection.cursor() + periodical_schema = \ + "'http://xmlns.sony.net/e-book/prs/periodicals/1.0/newspaper/1.0'" + # Setting this to the SONY periodical schema apparently causes errors + # with some periodicals, therefore set it to null, since the special + # periodical navigation doesn't work anyway. + periodical_schema = 'null' + query = ''' UPDATE books - SET conforms_to = 'http://xmlns.sony.net/e-book/prs/periodicals/1.0/newspaper/1.0', + SET conforms_to = %s, periodical_name = ?, description = ?, publication_date = ? WHERE _id = ? - ''' + '''%periodical_schema t = (name, None, pubdate, book.bookId,) cursor.execute(query, t)