mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix commas not working in identifiers that are transformed to URLs via rules. Fixes #1779602 [Identifier with comma](https://bugs.launchpad.net/calibre/+bug/1779602)
This commit is contained in:
parent
5a29b8fe39
commit
52be7610ed
@ -423,8 +423,7 @@ def identify(log, abort, # {{{
|
|||||||
if not is_worker_alive(workers):
|
if not is_worker_alive(workers):
|
||||||
break
|
break
|
||||||
|
|
||||||
if (first_result_at is not None and time.time() - first_result_at >
|
if (first_result_at is not None and time.time() - first_result_at > wait_time):
|
||||||
wait_time):
|
|
||||||
log.warn('Not waiting any longer for more results. Still running'
|
log.warn('Not waiting any longer for more results. Still running'
|
||||||
' sources:')
|
' sources:')
|
||||||
for worker in workers:
|
for worker in workers:
|
||||||
@ -486,8 +485,7 @@ def identify(log, abort, # {{{
|
|||||||
result.series_index = dummy.series_index
|
result.series_index = dummy.series_index
|
||||||
result.relevance_in_source = i
|
result.relevance_in_source = i
|
||||||
result.has_cached_cover_url = (
|
result.has_cached_cover_url = (
|
||||||
plugin.cached_cover_url_is_reliable and
|
plugin.cached_cover_url_is_reliable and plugin.get_cached_cover_url(result.identifiers) is not None)
|
||||||
plugin.get_cached_cover_url(result.identifiers) is not None)
|
|
||||||
result.identify_plugin = plugin
|
result.identify_plugin = plugin
|
||||||
if msprefs['txt_comments']:
|
if msprefs['txt_comments']:
|
||||||
if plugin.has_html_comments and result.comments:
|
if plugin.has_html_comments and result.comments:
|
||||||
@ -543,6 +541,7 @@ def urls_from_identifiers(identifiers): # {{{
|
|||||||
if rules:
|
if rules:
|
||||||
formatter = EvalFormatter()
|
formatter = EvalFormatter()
|
||||||
for k, val in identifiers.iteritems():
|
for k, val in identifiers.iteritems():
|
||||||
|
val = val.replace('|', ',')
|
||||||
vals = {'id':quote(val if isinstance(val, bytes) else val.encode('utf-8')).decode('ascii')}
|
vals = {'id':quote(val if isinstance(val, bytes) else val.encode('utf-8')).decode('ascii')}
|
||||||
items = rules.get(k) or ()
|
items = rules.get(k) or ()
|
||||||
for name, template in items:
|
for name, template in items:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user