mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
never reached code
This commit is contained in:
parent
b5094f2f5d
commit
b84daddb74
@ -420,37 +420,31 @@ def mi_to_html(
|
||||
if not metadata.get('display', {}).get('is_names', False):
|
||||
all_vals = sorted(all_vals, key=sort_key)
|
||||
links = []
|
||||
if show_links:
|
||||
for x in all_vals:
|
||||
if metadata['is_custom']:
|
||||
u, v = cc_search_action_with_data(field, x, book_id, metadata, mi, field)
|
||||
v = f'<a href="{u}" title="{v}">{p(x)}</a>'
|
||||
else:
|
||||
v = '<a href="{}" title="{}">{}</a>'.format(
|
||||
search_action_with_data(st, x, book_id, field),
|
||||
_('Click to see books with {0}: {1}').format(
|
||||
metadata['name'] or field, a(x)), p(x))
|
||||
v += add_other_links(field, x)
|
||||
links.append(v)
|
||||
else:
|
||||
links = all_vals
|
||||
for x in all_vals:
|
||||
if metadata['is_custom']:
|
||||
u, v = cc_search_action_with_data(field, x, book_id, metadata, mi, field)
|
||||
v = f'<a href="{u}" title="{v}">{p(x)}</a>'
|
||||
else:
|
||||
v = '<a href="{}" title="{}">{}</a>'.format(
|
||||
search_action_with_data(st, x, book_id, field),
|
||||
_('Click to see books with {0}: {1}').format(
|
||||
metadata['name'] or field, a(x)), p(x))
|
||||
v += add_other_links(field, x)
|
||||
links.append(v)
|
||||
val = value_list(metadata['is_multiple']['list_to_ui'], links)
|
||||
else:
|
||||
try:
|
||||
st = metadata['search_terms'][0]
|
||||
except Exception:
|
||||
st = field
|
||||
if show_links:
|
||||
if metadata['is_custom']:
|
||||
u, v = cc_search_action_with_data(st, unescaped_val, book_id, metadata, mi, field)
|
||||
v = f'<a href="{u}" title="{v}">{p(unescaped_val)}</a>'
|
||||
else:
|
||||
v = '<a href="{}" title="{}">{}</a>'.format(
|
||||
search_action_with_data(st, unescaped_val, book_id, field),
|
||||
_('Click to see books with {0}: {1}').format(
|
||||
metadata['name'] or field, a(unescaped_val)), p(unescaped_val))
|
||||
if metadata['is_custom']:
|
||||
u, v = cc_search_action_with_data(st, unescaped_val, book_id, metadata, mi, field)
|
||||
v = f'<a href="{u}" title="{v}">{p(unescaped_val)}</a>'
|
||||
else:
|
||||
v = val
|
||||
v = '<a href="{}" title="{}">{}</a>'.format(
|
||||
search_action_with_data(st, unescaped_val, book_id, field),
|
||||
_('Click to see books with {0}: {1}').format(
|
||||
metadata['name'] or field, a(unescaped_val)), p(unescaped_val))
|
||||
val = v + add_other_links(field, val)
|
||||
elif metadata['datatype'] == 'enumeration':
|
||||
u, v = cc_search_action_with_data(field, unescaped_val, book_id, metadata, mi, field)
|
||||
|
Loading…
x
Reference in New Issue
Block a user