mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix bug preventing customizing of builtin recipes if they are not ascii encoded
This commit is contained in:
parent
1c8d3ea752
commit
372c462ae7
@ -9,6 +9,7 @@ from zlib import compress, decompress
|
|||||||
|
|
||||||
from calibre.ebooks.metadata import MetaInformation
|
from calibre.ebooks.metadata import MetaInformation
|
||||||
from calibre.ebooks.metadata import string_to_authors
|
from calibre.ebooks.metadata import string_to_authors
|
||||||
|
from calibre import isbytestring
|
||||||
|
|
||||||
class Concatenate(object):
|
class Concatenate(object):
|
||||||
'''String concatenation aggregator for sqlite'''
|
'''String concatenation aggregator for sqlite'''
|
||||||
@ -1379,6 +1380,10 @@ ALTER TABLE books ADD COLUMN isbn TEXT DEFAULT "" COLLATE NOCASE;
|
|||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
|
|
||||||
def add_feed(self, title, script):
|
def add_feed(self, title, script):
|
||||||
|
if isbytestring(title):
|
||||||
|
title = title.decode('utf-8')
|
||||||
|
if isbytestring(script):
|
||||||
|
script = script.decode('utf-8')
|
||||||
self.conn.execute('INSERT INTO feeds(title, script) VALUES (?, ?)',
|
self.conn.execute('INSERT INTO feeds(title, script) VALUES (?, ?)',
|
||||||
(title, script))
|
(title, script))
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user