mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-06 22:05:09 +01:00
Fix bug preventing customizing of builtin recipes if they are not ascii encoded
This commit is contained in:
parent
1c8d3ea752
commit
372c462ae7
1 changed files with 5 additions and 0 deletions
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
from calibre.ebooks.metadata import MetaInformation
|
||||
from calibre.ebooks.metadata import string_to_authors
|
||||
from calibre import isbytestring
|
||||
|
||||
class Concatenate(object):
|
||||
'''String concatenation aggregator for sqlite'''
|
||||
|
|
@ -1379,6 +1380,10 @@ def remove_feeds(self, ids):
|
|||
self.conn.commit()
|
||||
|
||||
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 (?, ?)',
|
||||
(title, script))
|
||||
self.conn.commit()
|
||||
|
|
|
|||
Loading…
Reference in a new issue