mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Content server: Fix ugly URLs for specific format download in the book details and permalink panels
This commit is contained in:
parent
6c595afc21
commit
00653e3646
@ -669,10 +669,15 @@ class BrowseServer(object):
|
||||
args = {'id':id_, 'mi':mi,
|
||||
}
|
||||
ccache = self.categories_cache() if add_category_links else {}
|
||||
ftitle = fauthors = ''
|
||||
for key in mi.all_field_keys():
|
||||
val = mi.format_field(key)[1]
|
||||
if not val:
|
||||
val = ''
|
||||
if key == 'title':
|
||||
ftitle = xml(val, True)
|
||||
elif key == 'authors':
|
||||
fauthors = xml(val, True)
|
||||
if add_category_links:
|
||||
added_key = False
|
||||
fm = mi.metadata_for_field(key)
|
||||
@ -710,8 +715,8 @@ class BrowseServer(object):
|
||||
args[key] = xml(val, True)
|
||||
else:
|
||||
args[key] = xml(val, True)
|
||||
fname = quote(ascii_filename(args['title']) + ' - ' +
|
||||
ascii_filename(args['authors']))
|
||||
fname = quote(ascii_filename(ftitle) + ' - ' +
|
||||
ascii_filename(fauthors))
|
||||
return args, fmt, fmts, fname
|
||||
|
||||
@Endpoint(mimetype='application/json; charset=utf-8')
|
||||
|
Loading…
x
Reference in New Issue
Block a user