mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1804 (calibredb list - with umlauts in title) and return valid metadata for PRC files that have no EXTH record
This commit is contained in:
parent
4706660425
commit
4a8811f691
@ -505,7 +505,7 @@ def get_metadata(stream):
|
||||
except:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
return mi
|
||||
return mi
|
||||
|
||||
|
||||
def option_parser():
|
||||
|
@ -174,6 +174,9 @@ def do_list(db, fields, sort_by, ascending, search_text, line_width, separator,
|
||||
return template.generate(data=data).render('xml')
|
||||
elif output_format == 'stanza':
|
||||
data = [i for i in data if i.has_key('fmt_epub')]
|
||||
for x in data:
|
||||
if isinstance(x['fmt_epub'], unicode):
|
||||
x['fmt_epub'] = x['fmt_epub'].encode('utf-8')
|
||||
template = MarkupTemplate(STANZA_TEMPLATE)
|
||||
return template.generate(id="urn:calibre:main", data=data, subtitle=subtitle,
|
||||
sep=os.sep, quote=quote, updated=db.last_modified()).render('xml')
|
||||
|
Loading…
x
Reference in New Issue
Block a user